Title: Database issue, need cli mysql help
Last modified: August 18, 2016

---

# Database issue, need cli mysql help

 *  [cdkrall](https://wordpress.org/support/users/cdkrall/)
 * (@cdkrall)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/database-issue-need-cli-mysql-help/)
 * I just finished posting early this afternoon and then got a message that said…
 * >  WordPress
   >  Error establishing a database connection This either means that
   > the username and password information in your wp-config.php file is incorrect
   > or we can’t contact the database server at localhost. * Are you sure you have
   > the correct username and password? * Are you sure that you have typed the correct
   > hostname? * Are you sure that the database server is running?
 * I tried going into my GUI Control Panel, and could not get phpmyadmin to accept
   me. Later the Control Panel was inaccessable, and still is. PHPWebhosting is 
   clearly having a bad day…&^) And they aren’t returning messages sent to support.
   
   I do have ssh access, and so was wondering how I might reach in that way and 
   make a backup of my DB for possible salvage. I know this skirts the limits of
   interest on this forum, but an odd thing is that my abandoned Movable Type install
   still works, and is now doing duty as a “site down” poster. MT was also using
   a DB on the same server, and it’s still working. I saw another post here about
   a lost DB, and am wondering if there’s a larger problem. I’m using v. 1.3alpha4,
   IIRC. Thanks for any assistance, going back and working in MT was a good reminder
   of how much better WP is.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/database-issue-need-cli-mysql-help/#post-115789)
 * I think you should leave this alone for about twenty-four hours, and send a support
   email to your host, asking them what’s going on. As you mentioned, they’re having
   a bad day. You mentioned that you couldn’t access your database through phpmyadmin.
   Therefore, MySQL is probably down, which is why WordPress can’t connect to it.
   As long as MySQL is down, you’ll never be able to access it to make a backup.
   So, just wait and see if your host can clear it up in twenty-four hours.
 *  Thread Starter [cdkrall](https://wordpress.org/support/users/cdkrall/)
 * (@cdkrall)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/database-issue-need-cli-mysql-help/#post-115791)
 * Just came back, 8 hours later…
    Which reminds me, would be great to have a way
   to backup our DB from within the admin panel of WP. I had a plugin last summer
   that promised to do that, but it didn’t work. Thanks for replying and being the
   voice of reason while I panicked…&^)
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/database-issue-need-cli-mysql-help/#post-115811)
 * Just follow the phpmyadmin instructions. Once again, if phpmyadmin can’t access
   your MySQL database, then neither can WordPress or any other backup feature. 
   [http://www.tamba2.org.uk/wordpress/backup/](http://www.tamba2.org.uk/wordpress/backup/)
 *  Thread Starter [cdkrall](https://wordpress.org/support/users/cdkrall/)
 * (@cdkrall)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/database-issue-need-cli-mysql-help/#post-115838)
 * Thanks for that link. Right after the site came up yesterday it went back down.
   
   I tried the instructions on the CLI page, and after some experimenting, found
   what my server needed, but by then had exceeded my connection attempts limit..&
   ^) This command is what would have worked for me… `mysqldump -uusername -p --
   opt mydatabasename > dumpname.sql` If nothing else, I learned more about CLI.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Database issue, need cli mysql help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [cdkrall](https://wordpress.org/support/users/cdkrall/)
 * Last activity: [21 years, 4 months ago](https://wordpress.org/support/topic/database-issue-need-cli-mysql-help/#post-115838)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
