Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PHP Coding Academy - MySQL question

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
chriswadams



Joined: Tue Dec 01, 2009 12:54 am
Posts: 26

PostPosted: Fri Jul 30, 2010 12:25 am    Post subject: PHP Coding Academy - MySQL question Reply with quote

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.
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Fri Jul 30, 2010 7:15 am    Post subject: Reply with quote

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.....
Back to top
View user's profile Send private message MSN Messenger
Hudzilla
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 265
Location: LXF Towers

PostPosted: Fri Jul 30, 2010 11:50 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Crispy



Joined: Mon May 31, 2010 7:35 pm
Posts: 57

PostPosted: Fri Jul 30, 2010 1:01 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1661
Location: Guisborough

PostPosted: Fri Jul 30, 2010 1:08 pm    Post subject: Reply with quote

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.....
Back to top
View user's profile Send private message MSN Messenger
chriswadams



Joined: Tue Dec 01, 2009 12:54 am
Posts: 26

PostPosted: Sat Jul 31, 2010 2:48 am    Post subject: Reply with quote

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('Very Happy')
chriswadams
Back to top
View user's profile Send private message
nicephotog



Joined: Fri Nov 21, 2008 6:32 am
Posts: 14
Location: Australia

PostPosted: Wed Dec 08, 2010 3:31 am    Post subject: Reply with quote

When you install MySQL you must have a "root" user and root password.
Sometimes that sort of thing gets lost but the way you do it is to set it by starting the mysql daemon at the shell prompt after placing a special file and name in the server application folder that will set the root password. Then you can re-start it at the shell prompt and it will be usable under root with that password.

This is the one i know(lookup for each time)
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html#resetting-permissions-unix
C.5.4.1.2. Resetting the Root Password: Unix Systems

This is the command associate the previous information on the page for --init-file
mysqld_safe --init-file=/home/me/mysql-init &



While this is windows, there should be a "mysqladmin.bin" for unix types but is not a strict point.
http://docs.cacti.net/manual:087:1_installation.2_install_windows.5_install_mysql
Back to top
View user's profile Send private message Send e-mail
johnhudson
LXF regular


Joined: Wed Aug 03, 2005 2:37 pm
Posts: 857

PostPosted: Thu Dec 09, 2010 8:40 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast