Install/MySQL error - Could not connect to database; check y

Having trouble installing serendipity?
Post Reply
jweinberger
Regular
Posts: 13
Joined: Wed Apr 19, 2006 4:09 am

Install/MySQL error - Could not connect to database; check y

Post by jweinberger »

Hi:
I get the following when I try a "simple install" to create a test blog.

Code: Select all

Could not connect to database; check your settings.
The mySQL error was: Access denied for user 'root'@'localhost' (using password: NO)
I am using a valid mySQL user name, which has no password, and I leave the password field blank.

Does Serendipity require that there is a MySQL password? Or am I missing something?

Pardon the newbie question...this is my first attempt to set this up and my first attempt with MySQL...

Thanks for your help!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Install/MySQL error - Could not connect to database; che

Post by garvinhicking »

Hi!

S9y does not require a mysql password, but the error message tells you that root@localhost is not allowed to connect without a password.

It depends on whether a user connects to 'localhost' or your 'hostname' or your 'IP'. So maybe you only have an empty root password when connecting through a socket or the hostname.

Check your mysql user setup and create a specific s9y user account. Or you try the variations in the hostname like using '127.0.0.1' instead...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jweinberger
Regular
Posts: 13
Joined: Wed Apr 19, 2006 4:09 am

Now no database built?

Post by jweinberger »

Hi:

Thank you for that - I did set a password and then entered it, and it worked fine.

now it tells me that the database does not exist. I would have thought it would create it on the first try.

Which raises the question - what exactly do I have to have in place for this to work?

Do I need to create the database, what else? Is this documented anywhere?

The best outcome is that I find out how to let s9y create it for me...

Thanks for your help!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Now no database built?

Post by garvinhicking »

Hi!

Because of security issues, serendipity usually assumes that it has no privileges to create a database, which means you'd have to create it on your own. Either via phpMyAdmin or SQL commandline: "CREATE DATABASE serendipity;" for example.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jweinberger
Regular
Posts: 13
Joined: Wed Apr 19, 2006 4:09 am

Post by jweinberger »

Garvin:

thank you for your patience and help!

Once the database is created, is there anything else I need to create or have in place (tables, other users, whatever...) for s9y to work?

If this is documented somewhere that I've missed, please just point me there...

Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

No, you only need the empty database! Serendipity will create all required tables there. You just need to enter the user account + password that can access the database you created. :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jweinberger
Regular
Posts: 13
Joined: Wed Apr 19, 2006 4:09 am

Post by jweinberger »

Thank you very much for your help!!
Post Reply