MySQL Command Line Client

Last Updated -


Connecting to your database using mysql command line client

In your terminal, view your wp-config-hosting.php file using nano or vim.

$ nano /sites/domain.com/wp-config-hosting.php

Copy down the following details:

define('DB_NAME', 'database_name');

define('DB_USER', 'username');

define('DB_PASSWORD', 'database_password');

define('DB_HOST', 'database_host');

You can now close wp-config-hosting.php and use the mysql command line client with the details you saved from above.

In terminal enter the following:

$ mysql -u username -p database_password -h databasehost database_name

You should see the following command prompt that indicates you have successfully connected.

$ mysql> 

Related Topics

Pagely is the Managed WordPress Hosting Platform designed to exceed the needs of media, business, and Enterprise customers alike. We help the world's biggest brands scale WordPress.

Copyright © 2006-2016 Pagely, Inc. All rights reserved.
Pagely® and WordPress® are registered trademarks.

Pagely
Powered by Zendesk