LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2017, 09:43 AM   #1
mogmog
Member
 
Registered: Jun 2012
Location: UK
Posts: 80

Rep: Reputation: Disabled
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
 
Old 03-13-2017, 09:55 AM   #2
mogmog
Member
 
Registered: Jun 2012
Location: UK
Posts: 80

Original Poster
Rep: Reputation: Disabled
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?
 
Old 03-13-2017, 08:52 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 17,398
Blog Entries: 27

Rep: Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405
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.
 
1 members found this post helpful.
Old 03-14-2017, 05:36 AM   #4
mogmog
Member
 
Registered: Jun 2012
Location: UK
Posts: 80

Original Poster
Rep: Reputation: Disabled
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.

Last edited by mogmog; 03-14-2017 at 07:14 AM.
 
Old 03-14-2017, 07:09 AM   #5
mogmog
Member
 
Registered: Jun 2012
Location: UK
Posts: 80

Original Poster
Rep: Reputation: Disabled
Just found how to uninstall LAMP as I was (& may still be, in a terrible fug with the MYSQL databases) & currently installing XAMPP...
 
Old 03-14-2017, 08:33 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,391

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Quote:
Upload the WordPress files to the desired location on your web server": on a local machine (localhost) - where is that?)
If you are using Mint as the first youtube video is, the location is under the /var/www/html directory. If you move your files there, you should be able to access them from your web browser by entering localhost in the browser pointing to the file. I didn't watch the entire video link you posted so I don't know if it explains testing the various steps. Did you do that? That's all explained at the site below and although it is an Ubuntu site, everything in it should work the same on Mint. If you're not using Mint, you need to post which distribution and release you are using. If you can access your db from a terminal as you indicated above, you should be able to do it from the browser. I've not used WordPress so can't help with that.
 
1 members found this post helpful.
Old 03-14-2017, 12:23 PM   #7
mogmog
Member
 
Registered: Jun 2012
Location: UK
Posts: 80

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-14-2017, 09:28 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 17,398
Blog Entries: 27

Rep: Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405Reputation: 5405
Glad you got it fixed. Congrats.
 
Old 03-15-2017, 08:42 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by mogmog View Post
I have now managed to install WP but don't feel entirely certain how I got here.
Same process for new install, or a migration to a new host, or a remote database. Always the same procedure.

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;
Always the same test:
Creds in wp-config against command-line mysql using
Code:
mysql -uDB_USER -p -e "show databases;"
should show you the Wordpress database, if the credentials are correct in mysql
If not, double check.

Good Luck.
 
1 members found this post helpful.
Old 03-15-2017, 09:48 AM   #10
mogmog
Member
 
Registered: Jun 2012
Location: UK
Posts: 80

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-15-2017, 02:34 PM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://codex.wordpress.org/Installi...Minute_Install
https://codex.wordpress.org/Hardening_WordPress
 
  


Reply

Tags
mysql, wordpress


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Guidance To Troubleshoot WordPress/MySQL Problem frankbell Linux - Server 2 06-23-2016 09:12 PM
[SOLVED] MySQL & Wordpress High Memory Usage goes up by 5% every 15min peterson.julia Linux - Security 1 02-16-2011 02:23 AM
[SOLVED] Debian Etch, Wordpress+mysql: setup-mysql script = permission denied oznola Linux - Server 9 04-07-2010 08:08 PM
Balance Wordpress and MySQL Betzie Linux - Newbie 5 01-16-2009 04:12 PM
Installing WordPress on FC5 - Mysql / PHP problem ArthurDent Fedora 1 06-25-2006 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration