VectorLinux
July 28, 2014, 10:15:36 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: 1 [2] 3
  Print  
Author Topic: MySQL Problems - SOLVED  (Read 9548 times)
Martin109
Vectorite
***
Posts: 289


« Reply #15 on: August 27, 2008, 01:27:06 pm »

Looks like the ownership change was successful.

Getting the server started--
It seems to be looking in the wrong place for the data directory /var rather than /var/mysql.  I wonder if the mysql.server script will work any better to get the daemon/server started.  The command should be: ./etc/init.d/mysql.server start & (this is, of course, assuming the script is set to executable).

As an alternative: At this point you may also find that the service 'mysql' shows up in VASMs startup services section, and it may be as simple as checking the box and rebooting to get the mysql daemon started.

Just so you know, you are very close to getting the server started, and once you have it working you won't need to monkey with any of this again.

Cheers!

I tried the command

Code:
/etc/init.d/mysql.server start &

but got the result:

[1] 5643
bash: /etc/init.d/mysql.server: No such file or directory


so  I tried:

Code:
root:# locate mysql.server

and came up with:

/usr/man/man1/mysql.server.1
/usr/share/mysql/mysql.server


I tried:

Code:
root:# /usr/share/mysql/mysql.server start &

and got:

[1] 5578

root:# Starting MySQL/usr/share/mysql/mysql.server: line 159: kill: (5587) - No
such process!
 ERROR!

[1]+  Exit 1             /usr/share/mysql/mysql.server start


I tried the VASM utility, but mysql was not listed.
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Martin109
Vectorite
***
Posts: 289


« Reply #16 on: September 04, 2008, 01:04:29 pm »

I'm stuck with this; does anyone have any ideas? Undecided
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #17 on: September 06, 2008, 10:06:20 pm »

Updated:

Well, I finally found time to test the packages in the repository.  It turns out that version 5.0.45 in the repo is, well, not easy to work with - perhaps simply not configured correctly at compile time. So, it comes down to uninstalling that version and adding 5.0.51b from the 'testing' repo.  Make sure you have the testing repository enabled and then you can issue the following commands to get mysql running successfully.  Sorry about the run around - I wish I had tested v.5045 prior to the start of this thread.  It would have saved a bunch of time.

AS ROOT:
slapt-get --remove mysql-5.0.45-i586-1vl59
rm -drf /var/mysql/
slapt-get --install mysql-5.0.51b-i486-1
mysql_install_db
chown -R mysql.mysql /var/lib/mysql/
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
mysqld_safe &
mysqladmin -u root password 'make-new-root-password'


If you want to add a service that can be enabled/disabled to start at boot time via VASM:
cp /usr/share/mysql/mysql.server /etc/rc.d/init.d/mysql
you will now find mysql in the services section in VASM

If you want to have mysql daemon started at boot automatically (not interactive via VASM):
chmod -x /etc/rc.d/rc.mysqld

Again, sorry it took me so long to get back.  I've been low on time lately but managed to save some up for today!!

Cheers!
newt
« Last Edit: September 13, 2008, 11:12:44 am by newtor » Logged
Martin109
Vectorite
***
Posts: 289


« Reply #18 on: September 07, 2008, 12:27:55 am »

That's great, Newtor, I'll start on this today! Smiley
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Martin109
Vectorite
***
Posts: 289


« Reply #19 on: September 07, 2008, 01:23:38 am »

I've removed 5.0.45 succesfully.

I've enabled the 'testing' repo by uncommenting the following line from /etc/slapt-get/slaptgetrc, so that it now reads:

Code:
SOURCE=http://vectorlinux.osuosl.org/veclinux-5.9/testing/

I then rebooted.

However, when I give the command:

Code:
slapt-get --install mysql-5.0.51b-i486-1

I get:

Code:
Reading package lists... Done
No such package: mysql-5.0.51b-i486-1
« Last Edit: September 07, 2008, 04:12:57 am by Martin109 » Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #20 on: September 07, 2008, 08:16:55 am »

That's strange because 'slapt-get --install mysql-5.0.51b-i486-1' works as expected for me - I just removed/reinstalled to make sure it worked and it does.  As a side note, if you remove this version of mysql be sure to remove it only and not associated dependencies/packages because k3b and gambas both get removed along with it - strange.

You can start up GSLAPT, update the package lists, and then search for mysql.  You should see two version of mysql show up and v5.0.51b will be one of them; simply select it to be installed and execute all actions.  That will get it installed.

BTW, I should have stated that once you removed v5.0.45 you can remove the installed db leftovers:
as root, rm -drf /var/mysql/
Logged
Martin109
Vectorite
***
Posts: 289


« Reply #21 on: September 07, 2008, 12:00:32 pm »

Well, I finally found time to test the packages in the repository.  It turns out that version 5.0.45 in the repo is, well, not easy to work with - perhaps simply not configured correctly at compile time. So, it comes down to uninstalling that version and adding 5.0.51b from the 'testing' repo.  Make sure you have the testing repository enabled and then you can issue the following commands to get mysql running successfully.  Sorry about the run around - I wish I had tested v.5045 prior to the start of this thread.  It would have saved a bunch of time.

AS ROOT:
slapt-get --remove mysql-5.0.45-i586-1vl59
slapt-get --install mysql-5.0.51b-i486-1
mysql_install_db
chown -R mysql.mysql /var/lib/mysql/
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
mysqld_safe &
mysqladmin -u root password 'new-password'


If you want to add a service that can be enabled/disabled to start at boot time via VASM:
cp /usr/share/mysql/mysql.server /etc/rc.d/init.d/mysql
you will now find mysql in the services section in VASM

If you want to have mysql daemon started at boot automatically (not interactive via VASM):
chmod -x /etc/rc.d/rc.mysqld

Again, sorry it took me so long to get back.  I've been low on time lately but managed to save some up for today!!

Cheers!
newt

Nearly there, I hope!

I've installed mysql-5.0.51b-i486 using Gslapt.

I've followed the other commands you've listed.

Now, when I type:

vector://home/martin
root:# mysqld_safe &

I get:

[1] 3191
vector://home/martin
root:# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql

The terminal hangs at this point, except if I hit [return] it'll come back to the vector prompt.

Out of curiosity, I looked in /var/lib/mysql, and it was empty.

When I tried:

Code:
mysqladmin -u root password [my password went here]

I got:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'


***

Also, I tried:

Code:
cp /usr/share/mysql/mysql.server /etc/rc.d/init.d/mysql

but cannot subsequently find mysql anywhere in VASMCC, even after a reboot.




« Last Edit: September 07, 2008, 12:02:10 pm by Martin109 » Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #22 on: September 07, 2008, 12:36:10 pm »

Now, when I type:

vector://home/martin
root:# mysqld_safe &

I get:

[1] 3191
vector://home/martin
root:# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql

The terminal hangs at this point, except if I hit [return] it'll come back to the vector prompt.

That is normal and is what is expected.  The '&' symbol simply gives you the prompt after starting an application; without the & symbol you would not be able to get a command prompt in the same terminal window without the mysql process stopping.  However, if you start the daemon this way and close the terminal window then the process you've started will stop.  So, this step is basically just a way to start the service so you can change the mysql root password.

Out of curiosity, I looked in /var/lib/mysql, and it was empty.

When I tried:

Code:
mysqladmin -u root password [my password went here]

I got:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

/var/lib/mysql/ should not be empty - it should contain two directories.  Since it's empty, are you sure you installed the database after installing the newer version of mysql (i.e. as root, mysql_install_db).  That command should have installed the default database to /var/lib/mysql/.  Try re-running that command as root.

Once you get the default database installed, and the mysql server started, you should be able to change the mysql root password.

Also, I tried:

Code:
cp /usr/share/mysql/mysql.server /etc/rc.d/init.d/mysql

but cannot subsequently find mysql anywhere in VASMCC, even after a reboot.

It is located in VASMCC, Services, Services, select your boot level (4 gui desktop is default), you'll be presented with a listing that should contain mysql (alphabetically).  The script that gets copied needs to be executable.  On my 5.9STD system is was executable by default, but perhaps you'll need to explicitly change it yourself (as root, chmod a+rx /etc/rc.d/init.d/mysql)
« Last Edit: September 07, 2008, 12:41:46 pm by newtor » Logged
Martin109
Vectorite
***
Posts: 289


« Reply #23 on: September 07, 2008, 02:00:56 pm »

/var/lib/mysql/ should not be empty - it should contain two directories.  Since it's empty, are you sure you installed the database after installing the newer version of mysql (i.e. as root, mysql_install_db).  That command should have installed the default database to /var/lib/mysql/.  Try re-running that command as root.

Right, I've re-run, as root, the command:

Code:
mysql_install_db

and get:

Code:
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h vector.linux.net password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

However, /var/lib/mysql is still empty!

And I'm still getting the same error message when trying, as root, to change the password.  I also tried it exactly as specified in the above terminal display text, but get the same answer.

I've tried issuing the command:

Code:
locate mysql

and had many files listed (too numerous to list here, but I will if you like!).  The location /usr/bin had many of these, but issuing the mysqladmin password commands in relation to that directory produced just the same error message.

... but, now managed to find mysql in VASMCC,Services,Services, Runlevel4!

Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #24 on: September 08, 2008, 08:41:59 am »

Well, I'll be darned Grin.  I cannot explain why you are having such a different outcome that I did with the newer version of mysql - maybe leftovers from the previous version of mysql???  At least your mysql server is starting successfully, and you can access the startup service via VASM.  I'll sure give it a whirl to try to help you get the whole thing working.

I believe the only reason you cannot change the mysql root password is because the server cannot find the default database that stores the basic structure.  To resolve this I think you will need to manually put the database in the correct location.  To do that, I would (again) locate the directory containing files with the extensions: .frm, .myd, .myi.  Then I would move that directory to /var/lib/mysql/ (as root, mv /path/of/original/mysql/ /var/lib/mysql/).  You should end up with the following path structure: /var/lib/mysql/mysql/.  All files with the aforementioned extensions would be stored within the second /mysql directory.  You then need to make sure the entire /var/lib/mysql/ directory structure is owned by mysql (as root, chown -R mysql.mysql /var/lib/mysql/).  Now, start your mysql server and attempt to change the root password again.  We're hoping for good luck this time Grin
Logged
Martin109
Vectorite
***
Posts: 289


« Reply #25 on: September 08, 2008, 12:48:59 pm »

Thanks for all this help, Newtor!

For some reason, perhaps the enabling of mysql in VASMCC(?), quite a bit of what you are describing is already in place.

Here's a list of the files in /var/lib/mysql:

Code:
total 23588
-rw-rw---- 1 mysql mysql  5242880 2008-09-08 19:55 ib_logfile0
-rw-rw---- 1 mysql mysql  5242880 2008-09-07 18:50 ib_logfile1
-rw-rw---- 1 mysql mysql 10485760 2008-09-08 19:43 ibdata1
drwx------ 2 mysql mysql     4096 2008-09-07 18:49 mysql/
-rw-rw---- 1 mysql mysql      279 2008-09-07 18:57 mysql-bin.000001
-rw-rw---- 1 mysql mysql      117 2008-09-07 18:57 mysql-bin.000002
-rw-rw---- 1 mysql mysql      141 2008-09-07 19:08 mysql-bin.000003
-rw-rw---- 1 mysql mysql      117 2008-09-07 19:09 mysql-bin.000004
-rw-rw---- 1 mysql mysql      117 2008-09-07 21:31 mysql-bin.000005
-rw-rw---- 1 mysql mysql     2149 2008-09-07 21:03 mysql-bin.000006
-rw-rw---- 1 mysql mysql   606839 2008-09-07 21:03 mysql-bin.000007
-rw-rw---- 1 mysql mysql     2149 2008-09-07 21:06 mysql-bin.000008
-rw-rw---- 1 mysql mysql   606839 2008-09-07 21:06 mysql-bin.000009
-rw-rw---- 1 mysql mysql     2149 2008-09-07 21:07 mysql-bin.000010
-rw-rw---- 1 mysql mysql   606839 2008-09-07 21:07 mysql-bin.000011
-rw-rw---- 1 mysql mysql     2149 2008-09-07 21:07 mysql-bin.000012
-rw-rw---- 1 mysql mysql   606839 2008-09-07 21:07 mysql-bin.000013
-rw-rw---- 1 mysql mysql     2149 2008-09-07 21:08 mysql-bin.000014
-rw-rw---- 1 mysql mysql   606839 2008-09-07 21:08 mysql-bin.000015
-rw-rw---- 1 mysql mysql       98 2008-09-08 19:55 mysql-bin.000016
-rw-rw---- 1 mysql mysql      304 2008-09-08 19:55 mysql-bin.index
drwx------ 2 mysql mysql     4096 2008-09-07 18:49 test/
-rw-rw---- 1 mysql mysql     6145 2008-09-08 19:55 vector.linux.net.err
-rw-rw---- 1 mysql mysql        5 2008-09-08 19:55 vector.linux.net.pid

And here's a list of the files in /var/lib/mysql/mysql:

Code:
total 780
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 columns_priv.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 columns_priv.MYI
-rw-rw---- 1 mysql mysql   8820 2008-09-07 18:49 columns_priv.frm
-rw-rw---- 1 mysql mysql    876 2008-09-07 18:49 db.MYD
-rw-rw---- 1 mysql mysql   4096 2008-09-07 18:49 db.MYI
-rw-rw---- 1 mysql mysql   9494 2008-09-07 18:49 db.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 func.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 func.MYI
-rw-rw---- 1 mysql mysql   8665 2008-09-07 18:49 func.frm
-rw-rw---- 1 mysql mysql  20916 2008-09-07 21:08 help_category.MYD
-rw-rw---- 1 mysql mysql   3072 2008-09-07 21:08 help_category.MYI
-rw-rw---- 1 mysql mysql   8700 2008-09-07 18:49 help_category.frm
-rw-rw---- 1 mysql mysql  78997 2008-09-07 21:08 help_keyword.MYD
-rw-rw---- 1 mysql mysql  14336 2008-09-07 21:08 help_keyword.MYI
-rw-rw---- 1 mysql mysql   8612 2008-09-07 18:49 help_keyword.frm
-rw-rw---- 1 mysql mysql   7425 2008-09-07 21:08 help_relation.MYD
-rw-rw---- 1 mysql mysql  16384 2008-09-07 21:08 help_relation.MYI
-rw-rw---- 1 mysql mysql   8630 2008-09-07 18:49 help_relation.frm
-rw-rw---- 1 mysql mysql 347064 2008-09-07 21:08 help_topic.MYD
-rw-rw---- 1 mysql mysql  17408 2008-09-07 21:08 help_topic.MYI
-rw-rw---- 1 mysql mysql   8770 2008-09-07 18:49 help_topic.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 host.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 host.MYI
-rw-rw---- 1 mysql mysql   9416 2008-09-07 18:49 host.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 proc.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 proc.MYI
-rw-rw---- 1 mysql mysql   9691 2008-09-07 18:49 proc.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 procs_priv.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 procs_priv.MYI
-rw-rw---- 1 mysql mysql   8875 2008-09-07 18:49 procs_priv.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 tables_priv.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 tables_priv.MYI
-rw-rw---- 1 mysql mysql   8947 2008-09-07 18:49 tables_priv.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 time_zone.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 time_zone.MYI
-rw-rw---- 1 mysql mysql   8636 2008-09-07 18:49 time_zone.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 time_zone_leap_second.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 time_zone_leap_second.MYI
-rw-rw---- 1 mysql mysql   8624 2008-09-07 18:49 time_zone_leap_second.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 time_zone_name.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 time_zone_name.MYI
-rw-rw---- 1 mysql mysql   8606 2008-09-07 18:49 time_zone_name.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 time_zone_transition.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 time_zone_transition.MYI
-rw-rw---- 1 mysql mysql   8686 2008-09-07 18:49 time_zone_transition.frm
-rw-rw---- 1 mysql mysql      0 2008-09-07 18:49 time_zone_transition_type.MYD
-rw-rw---- 1 mysql mysql   1024 2008-09-07 18:49 time_zone_transition_type.MYI
-rw-rw---- 1 mysql mysql   8748 2008-09-07 18:49 time_zone_transition_type.frm
-rw-rw---- 1 mysql mysql    304 2008-09-07 18:51 user.MYD
-rw-rw---- 1 mysql mysql   2048 2008-09-07 18:57 user.MYI
-rw-rw---- 1 mysql mysql  10330 2008-09-07 18:49 user.frm

That looks encouraging.  But the command to set the password still isn't working.

(Quote:)
You should end up with the following path structure: /var/lib/mysql/mysql/.  All files with the aforementioned extensions would be stored within the second /mysql directory.  You then need to make sure the entire /var/lib/mysql/ directory structure is owned by mysql (as root, chown -R mysql.mysql /var/lib/mysql/).  Now, start your mysql server and attempt to change the root password again.
(/Quote)

I used (as root) command:

Code:
chown -R mysql.mysql /var/lib/mysql/

but with this, or any other variation of the chown command I can think of, then starting mysql with

Code:
mysqld_safe &

the password command

Code:
mysqladmin -u root password [my_password_here]   (same as my normal root password)

isn't working.

I tried (all as root):
chown -R mysql.mysql /var/lib/mysql
chown -R mysql.mysql /var/lib/mysql/
chown -R mysql.mysql /var/lib/mysql/mysql/
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #26 on: September 08, 2008, 02:08:47 pm »

Well, it looks like the directory structure is all accounted for and ownership looks correct.  That's good!

When you start the server it is actually starting, correct?  In other words, you're not seeing the 'STOPPING .....' message anymore?  As a double-check, start the server if it's not already and make sure it's started by looking through your systems running processes (as root, ps -a or ps -ax) - if you see mysqld_safe listed then it should be running correctly.

What's is the output when you attempt to change the root password?  An error?

Does /usr/bin/mysqladmin -u root password 'password_here' work any better?

Can you login to the mysql command line (mysql -u root or mysql -u root -p)?

It seems like it should all be working correctly now. I cannot understand why setting the root password is not working as long as the mysql daemon is started.
Logged
Martin109
Vectorite
***
Posts: 289


« Reply #27 on: September 08, 2008, 02:36:55 pm »

When you start the server it is actually starting, correct?  In other words, you're not seeing the 'STOPPING .....' message anymore?  As a double-check, start the server if it's not already and make sure it's started by looking through your systems running processes (as root, ps -a or ps -ax) - if you see mysqld_safe listed then it should be running correctly.

The command

Code:
ps -ax

gives the output:

3601 ?       S      0:00  /bin/sh  /usr/bin/mysqld_safe

What's is the output when you attempt to change the root password?  An error?

The command

Code:
mysqladmin -u root password [my-password-here]

gives the output:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'


Does /usr/bin/mysqladmin -u root password 'password_here' work any better?

The command

Code:
/usr/bin/mysqladmin -u root password [my-password-here]

gives the output:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Can you login to the mysql command line (mysql -u root or mysql -u root -p)?

The command

Code:
mysql -u root -p

gives the output:

Enter password: (I type something here)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


... whatever I type!
« Last Edit: September 08, 2008, 02:38:27 pm by Martin109 » Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Martin109
Vectorite
***
Posts: 289


« Reply #28 on: September 08, 2008, 03:09:10 pm »

Mysql Reference Manual pages refers to 'Access Denied' problems and states:

Quote
If you try to connect as root and get the following error, it means that you do not have a row in the user table with a User column value of 'root' and that mysqld cannot resolve the hostname for your client:

Access denied for user ''@'unknown' to database mysql

In this case, you must restart the server with the --skip-grant-tables option and edit your /etc/hosts file or \windows\hosts file to add an entry for your host.

I've found the /etc/hosts files, but wouldn't know what to enter there!
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #29 on: September 08, 2008, 03:38:27 pm »

Quote
The command

Code: mysqladmin -u root password [my-password-here]

gives the output:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
The 'Access denied for user 'root'@'localhost' (using password: NO)' means that a password for root has already been set - it differs from what you found in that the server is indicating that root access to the localhost server is denied because you are not using a password (in other words, root access requires a password that has already been set).  Is it possible that it was successfully set in one of your previous attempts?  If so, do you remember all of the passwords you have tried over the past couple days?

You can keep attempting to reset the mysql root password with:
mysqladmin -u root -p password 'your_new_password'
This will prompt you each time to enter the root password in order to change the root password.  I would try this command several times with any/all passwords you have tried setting in the past couple days starting with simply an [Enter] (i.e. nothing).  Some other passwords you should try are:
'new-password'
'[my password went here]'
'[my_password_here]'
'my password went here'
'my_password_here'
and any others that may have slipped in there on accident.

I guess worst case scenario would be to stop the mysql server (/etc/rc.d/init.d/mysql stop), remove /var/lib/mysql/mysql/ (rm -drf /var/lib/mysql/mysql/), reinstall the default database (mysql_install_db), and make sure the ownership is set correctly (chown -R mysql.mysql /var/lib/mysql/) to get back to a default/empty database.  Then start the server (mysqld_safe &), and attempt setting the root password again (mysqladmin -u root password 'password').
« Last Edit: September 08, 2008, 03:40:07 pm by newtor » Logged
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!