PHP Coding Academy - MySQL question

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

PHP Coding Academy - MySQL question

Postby chriswadams » Thu Jul 29, 2010 11:25 pm

Hey all --

I got issue #134 today with the "PHP Coding Academy" booklet, and I just finished the 1st assignment. It went well, but I had a problem with installing MySQL -- it never asked me for a password. Looking ahead at assignment #4, this looks like it will be a big problem, since I will need the password just to start MySQL. Is there some other way to set the password?

Thanks,
chriswadams.
User avatar
chriswadams
 
Posts: 27
Joined: Tue Dec 01, 2009 12:54 am

Postby Ram » Fri Jul 30, 2010 6:15 am

It probably as not installed correctly - un-install it and try again.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1679
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby Hudzilla » Fri Jul 30, 2010 10:50 am

Hey!

Yes, it's definitely a problem if you don't have a password for MySQL. It's possible that you had some components installed previously, or maybe just hit Enter at the wrong time?

Anyway, you want to zap mysql-server, not just uninstall - I think Synaptic calls it "Completely Remove" or something, and it means any passwords that were set will be removed as well.


Paul
User avatar
Hudzilla
Site admin
 
Posts: 265
Joined: Mon Apr 04, 2005 11:52 am
Location: LXF Towers

Postby Crispy » Fri Jul 30, 2010 12:01 pm

Hey,

I found the same problem originally as I used apt-get to install it but as I was about to change to fedora 13 it didn't worry me. So just out of curiosity, is there a way to give it a password through the command line?

Chris
Crispy
 
Posts: 57
Joined: Mon May 31, 2010 6:35 pm

Postby Ram » Fri Jul 30, 2010 12:08 pm

Maybe, but zapping it would be quickest.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1679
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby chriswadams » Sat Jul 31, 2010 1:48 am

Hey all --

Hudzilla wrote:
[quote]It's possible that you had some components installed previously, or maybe just hit Enter at the wrong time? [/quote]

Yes, I think that's what happened. But I had tried to 'Completely Uninstall' MySQL before, and still couldn't get it to ask me for a password.

Tonight, I did a 'Complete Uninstall' on mysql-server, mysql-server-5.1, mysql-server-core-5.1, and mysql-common, then rebooted, then reinstalled them -- and that worked!

Thanks for the advice guys! javascript:emoticon(':D')
chriswadams
User avatar
chriswadams
 
Posts: 27
Joined: Tue Dec 01, 2009 12:54 am

Postby johnhudson » Thu Dec 09, 2010 8:40 am

When it is initially installed mysql normally has no passwords and two anonymous users, meaning that anyone can use it. If you give a password, it denies access because it does not have a password listed and treats this as an illegal command.

If you can, start mysql without a password and enter
select * from mysql.user;
to find out the current status of your users
johnhudson
LXF regular
 
Posts: 881
Joined: Wed Aug 03, 2005 1:37 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests