首页 > 数据库 >在linux上安装mysql(二进制,binary)

在linux上安装mysql(二进制,binary)

时间:2023-01-03 17:44:07浏览次数:37  
标签:binary 01 23 mysql 03T09 2023 linux

1. 去https://dev.mysql.com/downloads/file/?id=514030 下载mysql-5.7.40-linux-glibc2.12-x86_64.tar,将它scp到目标机器上。保存到/root/tools/下;

 

2. 执行如下命令,将这个tarball解压成两个文件:

tar -xf mysql-5.7.40-linux-glibc2.12-x86_64.tar

其中一个文件是mysql-5.7.40-linux-glibc2.12-x86_64.tar.gz,另一个文件是mysql-test-5.7.40-linux-glibc2.12-x86_64.tar.gz;

 

3. 将mysql-5.7.40-linux-glibc2.12-x86_64.tar.gz解压到当前文件夹:

tar -zxvf mysql-5.7.40-linux-glibc2.12-x86_64.tar.gz

这样,mysql就解压到/root/tools/mysql-5.7.40-linux-glibc2.12-x86_64 下了;

 

4. 将mysql/bin目录配置到path下:

vi /etc/profile

...


export MYSQL_HOME=/root/tools/mysql-5.7.40-linux-glibc2.12-x86_64
export PATH=$MYSQL_HOME/bin:$JAVA_HOME/bin:$PATH

...


source /etc/profile

 

5. 执行mysqld --initialize:

[root@localhost ~]# mysqld --initialize
2023-01-03T09:23:17.881654Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-01-03T09:23:17.881875Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2023-01-03T09:23:18.394574Z 0 [Warning] InnoDB: New log files created, LSN=45790
2023-01-03T09:23:18.466845Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2023-01-03T09:23:18.527584Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 4257472a-8b48-11ed-94f0-005056bc0a7f.
2023-01-03T09:23:18.528865Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2023-01-03T09:23:19.396935Z 0 [Warning] 
2023-01-03T09:23:19.396959Z 0 [Warning] 
2023-01-03T09:23:19.398153Z 0 [Warning] CA certificate ca.pem is self signed.
2023-01-03T09:23:19.555927Z 1 [Note] A temporary password is generated for root@localhost: zY7)Y;L;3Rio

 

待续

标签:binary,01,23,mysql,03T09,2023,linux
From: https://www.cnblogs.com/zhuyuanfu/p/17022978.html

相关文章

  • Linux远程命令+传输文件+清除ssh public key
    #!/bin/bashif[["$1"=='']];thenecho"iperror!*.sh192.168.1.1"exit0fiecho$1chmod+x/usr/local/test/agent>/root/.ssh/known_hostssshpas......
  • 软件开发入门教程网 之MySQL GROUP BY 语句
       ......
  • Linux安装Docker完整教程
    Docker及系统版本Docker从17.03版本之后分为CE(CommunityEdition:社区版)和EE(EnterpriseEdition:企业版)。相对于社区版本,企业版本强调安全性,但需付费使用。这里我们使用......
  • mysql中查询结果只保留数字函数
    CREATEDEFINER=`root`@`%`FUNCTION`getNum`(strvarchar(255))RETURNSvarchar(255)CHARSETutf8mb4BEGINDECLAREstrlengthINTDEFAULT0;DECLAREtempvarchar......
  • mysql8.0的版本忘记密码
    mysql8.0的版本;出现错误:ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:YES);第一步:关闭netstopmysql这个需要cmd的管理员权......
  • mariadb/mysql建立主从
    前提本方案是两节点主从方案,只要建立好主从,及时数据库挂掉又拉起主从模式不会失效。保证时间同步保证都安装了​​mysql/mariadb​​建立主从的过程这里介绍的是两节点主从......
  • 教你摸清 Linux PC 的性能底细?
    基准测试是一项测试或一系列测试,用来确定某个计算机硬件运行起来的状况有多好。在许多情况下,“基准测试”实际上等同于“压力测试”。通过测试硬件的极限,然后可以将测得的结......
  • 软件开发入门教程网 之MySQL DELETE 语句
       ......
  • Linux的串口非标准波特率设置更改
    用的是全志的R528SDK,Linux内核是5.4,新增加一个250000的非标准波特率参考网络大神文档,实践并记录宝贵的经验。方法:1、修改内核的/include/uapi/asm-generic/termbits.h......
  • Linux rbash Bypass
    rbash全称Restrictedbash,即受限制的bash 1.vi:setshell=/bin/bash:shell #设置环境变量exportPATH=/bin:/usr/bin:$PATHexportSHELL=/bin/bash:$SHE......