Linux上安装Mysql_笨菜先飞的博客-CSDN博客_linux安装mysql
构建本地化Blast2GO数据库 - 知乎
如何构建本地化的blast2go数据库_Xiaofei@IDO的博客-CSDN博客
*Linux 上 个人用户(非root用户安装mysql)_めそめそ负けること的博客-CSDN博客_linux 非root用户安装mysql
Linux非root用户安装Mysql_Shadownow的博客-CSDN博客
Linux下以非root用户安装mysql最全最完整教程_歌未晚的博客-CSDN博客_非root用户安装mysql
linux下普通用户安装MySQL--非root用户安装MySQL_@素素~的博客-CSDN博客_普通用户安装mysql
[client]
port=3307
socket=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/mysql.sock
[mysqld]
port=3307
basedir=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64
datadir=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/data
pid-file=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/mysql.pid
socket=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/mysql.sock
log_error=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/error.log
server-id=100
explicit_defaults_for_timestamp=true
skip-ssl
#安装并初始化mysql
./mysqld --defaults-file=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/my.cnf --initialize --user=wyw --basedir=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64 --datadir=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/data
#启动mysql
./mysqld_safe --defaults-file=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/my.cnf --user=wyw &
报错
230331 12:16:19 mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
修改文件里的默认位置
sed -i 's#/usr/local/mysql#/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64#g' /public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/bin/mysqld_safe
#启动mysql
./mysqld_safe --defaults-file=/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/my.cnf --user=wyw &
#查看是否成功监听3306端口
netstat -tln | grep 3306
cd ..
#查找root用户的初始登录密码
less error.log | grep root@localhost
#登录方法
/public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/bin/mysql -u root -p -S /public/home/wangyiwei/database/mysql-5.7.10-linux-glibc2.5-x86_64/mysql.sock
#修改密码
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
https://www.cnblogs.com/JohanChan/p/12092395.html