MYSQL - how to tell what's going on ? (WordPress)
Hi,
I followed a very clear pair of YouTube videos ([url]https://www.youtube.com/watch?v=eNpyEEW6No8[/url and https://www.youtube.com/watch?v=jUduv3_FY3c ]) on installing LAMP and WordPress. Thought I'd got it all right, but appear not to have as WordPress can't access the database. I've looked up the error, it's quite common, but nothing I've tried works. I'm not sure what the questions are to ask... Does MYSQL need to be started explicitly? Any command run starting MYSQL gets "ERROR 1045 (28000): Access denied for user... " If I run MYSQLD (is this the server? what's the relationship with this & MYSQL?) I get a whole host of warnings (170313....) Where do I fing MYSQL on my machine? How can I tell if I successfully created a database? Many thanks |
MYSQL / wordpress not connecting
It appears that my DB has been successfully created following this tutorial ( https://www.linux.com/learn/introduction-mysql ), I logged in & "use" took me to my database.
Given that the credentials appear correct & the WP config.php file have the correct credentials, what else is stopping the connection? Is the database located in the wrong place? How can I tell where WP is looking for it? I don't understand the "ABSPATH" entries if they are relevant? |
Have you configured your wp-config.php file correctly/ That's the first place to check.
Rather than going into a long answer, I'm going to suggest that you read a recent LQ blog post of mine. Then you can come back with specific questions. http://www.linuxquestions.org/questi...h-xammp-37327/ Also, I can recommend WordPress's on line help. It's rather overwhelming, but it is quite well-written. |
Frank,
Thanks for that. I just installed LAMP, not XAMPP so not sure how similar they are - the locations of the components are different I think. I have been using the WordPress help inter alia - I have spent a day and a half on this and end up with loads of not-quite-there tutorials/advice (eg from the WP Codex "Upload the WordPress files to the desired location on your web server": on a local machine (localhost) - where is that?) To a neophyte, that doesn't help much. In your XAMPP thread Step 1: Copy the website files -if you haven't yet got a website, is this what you unzip from the WP download? Do you copy & rename it to your site name? Many thanks in anticipation. |
Just found how to uninstall LAMP as I was (& may still be, in a terrible fug with the MYSQL databases) & currently installing XAMPP...
|
Quote:
|
Thanks Yancek, that's where I thought they would be, but nothing I have done worked so I began to doubt. I followed the videos to the letter, pausing & rewinding (they are very clear).
I just couldn't resolve it and uninstalled the LAMP stack & installed XAMPP to see if I had better luck. Nope - every single thing I have done has hiccupped or failed completely: XAMPP threw a bucketload of warnings & errors in installation and I don't think it installed correctly (eg I don't get the control panel as far as I can tell). However, phpmyadmin worked in my browser & I have now managed to get to the "famous 5 minute installation" stage (after 2 1/2 days of pain) In case it helps any other lost soul, in phpmyadmin, you either enter YOUR OWN password OR use the generated one - even though that is in a different section, it replaces the one you just typed in... (this resolved my recent grief. Earlier LAMP/mysql problems I have no idea). I have now managed to install WP but don't feel entirely certain how I got here. Thanks Frank & Yancek for taking the time to answer - both answers made me scrutinise everything again, which in turn led to success. Cheers. |
Glad you got it fixed. Congrats.
|
Quote:
The credentials in wp-config.php must be granted access in mysql to make the connection. eg: define('DB_NAME') define('DB_USER') define('DB_PASSWORD') Code:
mysql > grant all on DB_NAME.* to DB_USER@'localhost' identified by 'DB_PASSWORD'; flush privileges; exit; Creds in wp-config against command-line mysql using Code:
mysql -uDB_USER -p -e "show databases;" If not, double check. Good Luck. |
Hopefully won't have to do this again in a hurry.
Habitual, Might come in handy if I need to set up another site.
Thanks. |
|
All times are GMT -5. The time now is 07:51 PM. |