On Fri, Aug 8, 2008 at 10:55 PM, AndrewMcHorney <[EMAIL PROTECTED]>wrote:
> Hello
>
> I tried to login using localhost and root as user id with no password since
> I temporarily did not enter one when I installed the software. I am getting
> the following error message:
>
> MySQL Error Number 1045
> Access denied for user '[EMAIL PROTECTED]' (using password:NO)
>
> The port select is 3036.
>
> What does this error mean?
>
> Andrew
>
>
[EMAIL PROTECTED] ~]# lsof -i :3306
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
mysqld 31792 mysql 3u IPv4 434089 TCP *:mysql (LISTEN)
[EMAIL PROTECTED] ~]# kill -9 31792
[EMAIL PROTECTED] ~]# /etc/init.d/mysql start
Mysql Started
[EMAIL PROTECTED] ~]# mysql
Access denied for user 'root'@'localhost' (using password: NO)
[EMAIL PROTECTED] ~]# /etc/init.d/mysql stop
[EMAIL PROTECTED] ~]# mysqld_safe --skip-grant-tables &
[EMAIL PROTECTED] ~]#
[EMAIL PROTECTED] ~]# mysql -u root
mysql>
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where
User='root';
mysql> flush privileges;
mysql> quit
NEW-ROOT-PASSWORD above is whatever password you want to set.
[EMAIL PROTECTED] ~]# # /etc/init.d/mysql stop
[EMAIL PROTECTED] ~]# lsof -i :3306
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
mysqld 31792 mysql 3u IPv4 434089 TCP *:mysql (LISTEN)
[EMAIL PROTECTED] ~]# kill -9 31792
[EMAIL PROTECTED] ~]# fuser -k /usr/bin/mysqld_safe ( in
case you see mysql process is still running )
[EMAIL PROTECTED] ~]# vi /root/.my.cnf
[EMAIL PROTECTED] ~]# cat /root/.my.cnf
[client]
user="root"
pass="NEW-ROOT-PASSWORD"
[EMAIL PROTECTED] ~]#
[EMAIL PROTECTED] ~]# service mysql restart
[EMAIL PROTECTED] ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.21-standard-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> quit
Bye
[EMAIL PROTECTED] ~]#
Ensure that you are using the default port 3306. In case not, then try
connecting in the following way , assuming port is 3036.
[EMAIL PROTECTED] ~]# mysql -p 3036