By markdwardell
Hello DO: I am attempting to connect to The internal MySQL DB I logged in as root and wordpress_mysql_pass=“<some long string>”
I have tried connecting with client DataGrip (JetBrains) using username of **wordpress **and **wordpress_mysql **feel the pwd must be correct because the WordPress droplet is fuctional. But connecting to MySQL is not with either of the usernames.
Is there Some other client tool I should try?
Mark Wardell
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @markdwardell
Would you mind sharing if you’re getting any exact error messages when trying to access the database using the client you’ve mentioned?
Have you tried to access the database using alternative client or simply by using the MySQL client when you’re logged in with ssh on the droplet itself?
You can check this tutorial as well:
How to Connect to a MySQL Server Remotely with MySQL Workbench
Regards, Alex
Hi @markdwardell,
So, the first thing you can always check to learn your user’s password without changing it is your WordPress’s wp-config.php file. In there you can see the database credentials your website is using. Usually, it looks something like this:
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );
/** MySQL database username */
define( 'DB_USER', 'wordpress' );
/** MySQL database password */
define( 'DB_PASSWORD', 'PasswordHere' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
And when using a WordPress droplet, you can find the file at the following path - /var/www/html/wp-config.php
Now, if you actually changed the password of your wordpress user, you’ll need to update it in your configuration file as well.
If you want to change the password your wordpress user is using, you can do the following once you’ve SSHed to the droplet:
mysql
ALTER USER 'wordpress'@'localhost' IDENTIFIED BY 'NEW_PASSWORD_HERE';
Once you do change the password, remember to change it in the wp-config.php file as well.
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.