• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: how to install mysql  (Read 2583 times)
caveman978
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: April 15, 2009, 11:22:52 AM »

I'm having issues getting mysql to successfully install.  Specifically being able to set or change the password.
Code:
apt-get install mysql-server mysql-common mysql-client

During installation I get the following prompt:
Code:
While not mandatory, it is highly recommended that you set a password
 for the MySQL administrative "root" user.
 If that field is left blank, the password will not be changed.
 New password for the MySQL "root" user:

At that prompt I type in my password:  nosoup4u
The next prompt is:
Code:
Repeat password for the MySQL "root" user:

At that prompt I type in my password, again:  nosoup4u

Once the installation is finished I try to login to mysql:
Code:
root@sheevaplug:/var/log# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

As expected, there is a password set.
So I try to login using the password I set during installation.
Code:
root@sheevaplug:/var/log# mysql -u root -p
Enter password: nosoup4u
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Has anyone been able to successfully install mysql on the sheevaplug?
I'm starting to think this might be file permissions or something specific to the file structure.
I'm looking for advice or guidance.
Logged

plugit
Global Moderator
Full Member
*****

Karma: 0
Posts: 141



View Profile
« Reply #1 on: April 15, 2009, 11:40:32 AM »

Give this a spin:

http://anojrs.blogspot.com/2007/11/access-denied-for-user-rootlocalhost.html
Logged

caveman978
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #2 on: April 15, 2009, 12:01:02 PM »

I've tried all those "reset" methods I could find.  Still no success, which is why I'm starting to think it's file or directory permissions.
Possibly read-only?  Looking for anyone who has had success in a default Ubuntu install of mysql on the sheevaplug.
Or what they had to do to make it work.


Code:
root@sheevaplug:/var/lib/mysql# /etc/init.d/mysql stop
 * Stopping MySQL database server mysqld                                 [ OK ]

root@sheevaplug:/var/lib/mysql# mysqld --skip-grant-tables
090415 14:52:37  InnoDB: Started; log sequence number 0 43655
090415 14:52:37 [Note] mysqld: ready for connections.
Version: '5.0.75-0ubuntu10'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

root@sheevaplug:/tmp# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.75-0ubuntu10 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> quit

root@sheevaplug:/tmp# /etc/init.d/mysql restart
 * Stopping MySQL database server mysqld                                 [ OK ]
 * Starting MySQL database server mysqld                                 [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

root@sheevaplug:/var/lib/mysql# mysql -u root -p
Enter password: my_password
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Logged

lee
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #3 on: April 15, 2009, 01:35:13 PM »

hi caveman, I noticed that when you did;

Code:
mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

nothing seems to have been changed, you could try to completely remove mysql and i's configs and re installing them from scrach;

Code:
sudo apt-get --purge remove mysql-server mysql-common mysql-client ; sudo apt-get install mysql-server mysql-common mysql-client

but I think it could be possible that the package has issues on armel, I had some problems with some of the armel packages of ubuntu on my n810 (xterm and smbfs execution errors etc) so I don't think it's quite there yet. Perhaps you could try sqlite which is compatible with php. Ubuntu only recently started to support armel and I think they're doing very well. Good luck Wink
Logged

plugit
Global Moderator
Full Member
*****

Karma: 0
Posts: 141



View Profile
« Reply #4 on: April 15, 2009, 01:52:59 PM »

Hey, if there's 0 rows changed, then there's no root user defined.
Logged

elBradford
Newbie
*

Karma: 0
Posts: 45


View Profile
« Reply #5 on: April 15, 2009, 09:10:42 PM »

I was able to successfully install mysql, however that was after changing my root password. I would suggest doing that for security reasons...

Code:
passwd root
Logged

pauldy
Newbie
*

Karma: 0
Posts: 18


View Profile
« Reply #6 on: April 15, 2009, 10:58:03 PM »

I see you add a root user but never see you give the user permissions.  This should be the hammer that taps that nail in for you.

from the shell start mysql sans the grant tables
Code:
mysqld --skip-grant-tables

from a mysql client session
Code:
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'nosoup4u' WITH GRANT OPTION;
Logged

caveman978
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #7 on: April 16, 2009, 11:17:29 AM »

I see you add a root user but never see you give the user permissions.  This should be the hammer that taps that nail in for you.

from the shell start mysql sans the grant tables
Code:
mysqld --skip-grant-tables

from a mysql client session
Code:
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'nosoup4u' WITH GRANT OPTION;



That worked, thank you.
Logged

HelenJames
Newbie
*

Karma: -2
Posts: 5


View Profile
« Reply #8 on: July 27, 2010, 07:20:25 PM »

Something alike was discussed on the ask.com,i can give someone a link if anybody need it
Logged

Pages: [1]
Print
Jump to: