| View previous topic :: View next topic |
| Author |
Message |
chriswadams
Joined: Tue Dec 01, 2009 12:54 am Posts: 26
|
Posted: Fri Jul 30, 2010 12:25 am Post subject: PHP Coding Academy - MySQL question |
|
|
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 |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1550 Location: Guisborough
|
Posted: Fri Jul 30, 2010 7:15 am Post subject: |
|
|
It probably as not installed correctly - un-install it and try again. _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
Hudzilla Site admin

Joined: Mon Apr 04, 2005 12:52 pm Posts: 265 Location: LXF Towers
|
Posted: Fri Jul 30, 2010 11:50 am Post subject: |
|
|
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 |
|
 |
Crispy
Joined: Mon May 31, 2010 7:35 pm Posts: 43
|
Posted: Fri Jul 30, 2010 1:01 pm Post subject: |
|
|
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 |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1550 Location: Guisborough
|
Posted: Fri Jul 30, 2010 1:08 pm Post subject: |
|
|
Maybe, but zapping it would be quickest. _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
chriswadams
Joined: Tue Dec 01, 2009 12:54 am Posts: 26
|
Posted: Sat Jul 31, 2010 2:48 am Post subject: |
|
|
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(' ')
chriswadams |
|
| Back to top |
|
 |
nicephotog

Joined: Fri Nov 21, 2008 6:32 am Posts: 14 Location: Australia
|
Posted: Wed Dec 08, 2010 3:31 am Post subject: |
|
|
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 |
|
 |
johnhudson LXF regular
Joined: Wed Aug 03, 2005 2:37 pm Posts: 767
|
Posted: Thu Dec 09, 2010 8:40 am Post subject: |
|
|
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 previous topic :: View next topic |
|