On Tue, 7 Oct 2008, Saifi Khan wrote: > Hi Naresh: > > Just check the [mysqld] section of /etc/my.cnf file and make sure you > got the following entries. > > [mysqld] > port = 3306 > socket = /var/lib/mysql/mysql.sock > skip-locking > skip-networking > > Let me know how it goes. > > thanks > Saifi. >
Hi Naresh: i tried to repro the situation you mentioned during the Triage IRC session. i did a fresh mysql installation and the entire setup process went without a hitch. Please see the log below. >>> At the time of starting the mysql service Also notice the last three lines of the log for the notification about fixing privileges ie. 'mysql_fix_privilege_tables'. patriot:~ # /etc/init.d/mysql start Creating MySQL privilege database... Installing MySQL system tables... OK Filling help tables... OK 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 patriot.localdomain 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 Updating MySQL privilege database... Looking for 'mysql' in: /usr/bin/mysql Looking for 'mysqlcheck' in: /usr/bin/mysqlcheck Running 'mysqlcheck'... mysql.columns_priv OK mysql.db OK mysql.func OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.proc OK mysql.procs_priv OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Running 'mysql_fix_privilege_tables'... OK Starting service MySQL done >>> At the time of accessing the service $> mysql -u root mysql mysql> \status -------------- mysql Ver 14.12 Distrib 5.0.51a, for suse-linux-gnu (i686) using readline 5.2 Connection id: 2 Current database: mysql Current user: [EMAIL PROTECTED] SSL: Not in use Current pager: less Using outfile: '' Using delimiter: ; Server version: 5.0.51a SUSE MySQL RPM Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 59 sec -- Conclusion: MySQL default installation configuration does not set a password for the root. Next, i went ahead and set the password for the root (of Mysql). [EMAIL PROTECTED]:~> mysqladmin -u root password 'twincling' Now, if you try to connect to the server using 'mysql' client for user 'root', you will see this error. [EMAIL PROTECTED]:~> mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) If you try specifying the 'localhost', you would see a similar error. [EMAIL PROTECTED]:~> mysql -u root -h localhost ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Solution: You need to specify '-p' option to prompt for password. If the correct password is specified, the 'mysql>' prompt will be seen. [EMAIL PROTECTED]:~> mysql -u root -h localhost -p Hope this addresses the problem that you are facing. Let me know how it goes. thanks Saifi.

