Access denied
root@192.168.0.53's password:
Last login: Thu Mar 21 10:32:25 2013
[root@aa-mysql-02 ~]#
[root@aa-mysql-02 ~]#
[root@aa-mysql-02 ~]#
[root@aa-mysql-02 ~]#
[root@aa-mysql-02 ~]# ls /media/
[root@aa-mysql-02 ~]# mount /dev/cdrom /media/
mount: you must specify the filesystem type
[root@aa-mysql-02 ~]# mount /dev/cdrom /media/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@aa-mysql-02 ~]# rpm -qa|grep mysql
mysql-libs-5.1.61-4.el6.x86_64
[root@aa-mysql-02 ~]# yum install mysql mysql-server
Loaded plugins: fastestmirror, security
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 56 - "Failure when receiving data from the peer"
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
[root@aa-mysql-02 ~]# ls
anaconda-ks.cfg install.log install.log.syslog
[root@aa-mysql-02 ~]# cd /etc/yum.repos.d/
[root@aa-mysql-02 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
[root@aa-mysql-02 yum.repos.d]# mv CentOS-Base.repo CentOS-Base
[root@aa-mysql-02 yum.repos.d]# vi CentOS-Media.repo
[root@aa-mysql-02 yum.repos.d]# yum install mysql mysql-server
Loaded plugins: fastestmirror, security
Determining fastest mirrors
* c6-media:
c6-media | 4.0 kB 00:00 ...
c6-media/primary_db | 4.5 MB 00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.61-4.el6 will be installed
---> Package mysql-server.x86_64 0:5.1.61-4.el6 will be installed
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.61-4.el6.x86_64
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Finished Dependency Resolution
Package Arch Version Repository Size
================================================================================
Installing:
mysql x86_64 5.1.61-4.el6 c6-media 882 k
mysql-server x86_64 5.1.61-4.el6 c6-media 8.6 M
Installing for dependencies:
perl-DBD-MySQL x86_64 4.013-3.el6 c6-media 134 k
================================================================================
Install 3 Package(s)
Installed size: 27 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 4.2 MB/s | 9.6 MB 00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysql-5.1.61-4.el6.x86_64 1/3
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 2/3
Installing : mysql-server-5.1.61-4.el6.x86_64 3/3
Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 1/3
Verifying : mysql-server-5.1.61-4.el6.x86_64 2/3
Verifying : mysql-5.1.61-4.el6.x86_64 3/3
mysql.x86_64 0:5.1.61-4.el6 mysql-server.x86_64 0:5.1.61-4.el6
perl-DBD-MySQL.x86_64 0:4.013-3.el6
[root@aa-mysql-02 yum.repos.d]# service mysqld status
mysqld is stopped
[root@aa-mysql-02 yum.repos.d]# service mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
support-files/mysql.server to the right place for your system
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root -h aa-mysql-02.puppet.com password 'new-password'
/usr/bin/mysql_secure_installation
databases and anonymous user created by default. This is
strongly recommended for production servers.
cd /usr ; /usr/bin/mysqld_safe &
cd /usr/mysql-test ; perl mysql-test-run.pl
Starting mysqld: [ OK ]
[root@aa-mysql-02 yum.repos.d]#
mysqld (pid 26045) is running...
[root@aa-mysql-02 yum.repos.d]# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@aa-mysql-02 yum.repos.d]# service mysqld stop
Stopping mysqld: [ OK ]
[root@aa-mysql-02 yum.repos.d]# mysqld_safe --user=mysql --skip-grant-tables &
[1] 26136
[root@aa-mysql-02 yum.repos.d]# 130321 13:07:38 mysqld_safe Logging to '/var/log/mysqld.log'.
130321 13:07:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.61 Source distribution
affiliates. Other names may be trademarks of their respective
owners.
ERROR 1049 (42000): Unknown database 'msyql'
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
mysql> update user set password=password('pepper') where user='root' host='localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'host='localhost'' at line 1
mysql> update user set password=password('pepper') where user='root'and host='localhost';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
Query OK, 0 rows affected (0.00 sec)
Bye
[root@aa-mysql-02 yum.repos.d]# service mysqld restart
130321 13:10:08 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[1]+ Done mysqld_safe --user=mysql --skip-grant-tables
[root@aa-mysql-02 yum.repos.d]# service mysqld status
mysqld (pid 26378) is running...
[root@aa-mysql-02 yum.repos.d]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.61 Source distribution
affiliates. Other names may be trademarks of their respective
owners.
Bye
[root@aa-mysql-02 yum.repos.d]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@aa-mysql-02 yum.repos.d]#