Little background: I used digital ocean to create a wordpress site.
I used the one click install they provided on their page and now my wordpress site is running.
And I followed this guide to do some preparation:
And then I followed the last step where they teach you how to install phpMyadmin GUI.
(this article):
However after installing it I cannot log into it, neither from the GUI nor from command line works.
Both of them gave me this error:
#1045 - Access denied for user ‘root’@‘localhost’ (using password: YES)
I did a simple google search and I found that I need to edit this file:
config.inc.php
And manually add in mySQL password.
But I cannot find this file on my Ubuntu server… Where can I find it and can I edit it inside terminal?
If so, how to do that ?
I key in pwd in terminal it shows me i am at root. But ls gives me nothing.
How do I edit that file then?
Hello @zhouxiang19910319 - have you tried the credentials WordPress uses to talk to the database? The username and password are found in a file located in the same folder as wp-admin and wp-content and wp-includes, and the file is called wp-config.php. The username and password are located right up top.
I am unsure what you are saying about " I did not set up wordpress locally". I assume from your original post that you set up WordPress using the “one-click” install on a Ubuntu server., and that you cannot log into phpmyadmin.
Assuming this is actually the case your WordPress files can be in a couple of places. They may be in the “root” folder, and if so there should be a “home” folder inside the root folder. If “home” is in there drill down through the folders until you come to the folders I outlined in my first post, ie wp-admin, wp-content, and wp-include. The file you want to examine is in the same folder as these 3 folders, and called wp-config.php.
If you cannot find the “home” folder inside the “root” folder try looking for it directly in the root of the file system, ie “/”. Just keep using the command “cd …” ( 2 dots, not 3 ) until you get to the root of the file system.
On my Digital Ocean server running Ubuntu and a nginx server my WordPress installation is at:
/home/{username}/[website name}/public/
where {username} is the name of the account you set up, and {website name} is the domain name you chose.
This may not be exact for your case ( I have observed a lot of variations between installations ) but it should point you in the correct direction.
I have no idea. Make sure you did not mis-spell the filename in nano, if you do it creates a new blank file, and it tricks you into thinking the file is empty.
I would still try to find your WordPress installation files and recover the database username and password that way.
Hi, I’m using Lubuntu so there will be some differences from Ubuntu and I dont have Wordpress. However, the location of the files on my system are: /usr/share/phpmyadmin/setup/frames/config.inc.php
/var/lib/phpmyadmin/config.inc.php
/etc/phpmyadmin/config.inc.php
You can find the files on your system by using su or sudo to gain root access, followed by the following command:
find / -name config.inc.php.
This searches all directories recursively from the root folder down.