mysqld 服务成功启动
[root@lly support-files]# netstat -tupln |grep mysqld
tcp 0 0 :::3306 :::*
[root@lly support-files]# cd ..
[root@lly mysql]# pwd
/usr/local/mysql
[root@lly mysql]# vim /etc/profile
重新登录一次
[root@lly ~]# mysql
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
[root@lly ~]# mysqladmin -u root -p password '123'设置一个管理员帐号密码123
[root@lly ~]# mysql -u root -p以后就可以以此帐号登陆了
mysql生成的/usr/local/mysql/lib库文件不是标准路径系统无法识别(/lib 或者/usr/lib为标准路径)所以需做如下配置
[root@lly mysql]# vim /etc/ld.so.conf.d/mysql.conf
写入
/usr/local/mysql/lib
刷新ld.so.cache
[root@lly mysql]# ll /etc/ld.so.cache
-rw-r--r-- 1 root root 81871 Apr 13 08:17 /etc/ld.so.cache
[root@lly mysql]# ldconfig
[root@lly mysql]# ll /etc/ld.so.cache
-rw-r--r-- 1 root root 82128 Apr 13 15:46 /etc/ld.so.cache
对mysql的头文件include做一个连接
[root@lly mysql]# ln -s /usr/local/mysql/include/ /usr/include/mysql