Mohsen,
Philip Mather wrote:
Mohsen,
First off, what version of MySQL are you running and on what
platform?
Now when i use --skip-grant-tables i can see my databases.
Please help me...
When you use MySQL via a shell I would assume you're logging in as
root? You also say you can only see a "test" database, can you not
see a "mysql" database there as well? I would suggest that somehow
either the "mysql" database has been dropped/destroyed or perhaps
just the db, host, tables_priv, and user tables of that database have
been dropped/destroyed/messed up.
Log in via shell and show us the result of the following commands...
"
mysql> use mysql;
mysql> show tables;
mysql> SELECT COUNT(*) FROM db;
mysql> SELECT COUNT(*) FROM user;
"
If you can't see the database and/or the tables I'm talking about you
may want to just check your backups are working and come back to us.
Regards,
Phil
When i use "ps ax |grep mysql " i see following statements:
6173 ? S 0:00 /bin/sh /home/arman/mysql/bin/mysqld_safe
--basedir=/home/arman/mysql/ --datadir=/home/arman/mysql/var/
--socket=/tmp/arman.sock --port=3310 --user=root --skip-grant-tables
6220 ? S 1:21 /home/arman/mysql/libexec/mysqld
--basedir=/home/arman/mysql/ --datadir=/home/arman/mysql/var/
--user=root --pid-file=/home/arman/mysql/var//lnxsrv2.pid
--skip-locking --port=3310 --socket=/tmp/arman.sock --skip-grant-tables
Now when i use following command :
[EMAIL PROTECTED] root]# /home/arman/mysql/bin/mysql --port=3310
--socket=/tmp/arman.sock --user=root -p
& then input password i see following message:
Enter password:
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
YES)
So,I can't use use command in mysql shell.
Yours,mohsen
So you can't login in as root even? Can you not get into the database at
all?
I must admit that I've never used MySQL installed under a user's home
directory, are you sure everything has the correct file permissions,
ownership and security contexts (if you're using SELinux)?
First off, backup the whole database and everything to do with it and
keep a copy somewhere safe, if you've got any sort of over night/off
site backup system grab a copy from that. Just make sure you can get
back to this point before going any further.
Secondly, can you think of anything you've done or maybe used (some
graphical database manager or tool) that could have messed your database
up? If you administer it via the command line who was the last person to
change any privileges and/or type "flush privileges;"?
After that there are four things I'd try but what sort of *N?X are you
using and what version of MySQL is it?
Regards,
Phil
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]