Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3759873
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

分类: LINUX

2020-12-09 17:52:57

https://www.cnblogs.com/centos-python/articles/10860421.html
https://www.cnblogs.com/galengao/p/5755788.html
cmake升级 hash -r
gcc升级
mysqld与mysqld_save的区别

下载的源码包 mysql-8.0.16.tar.gz

编译安装mysql-8.0.16 遇到的问题和解决方案:
一:CMake 3.4.3 or higher is required. You are running version 2.8.12.2
要求安装cmake3这个包
需要安装扩展包,cmake3 在扩展库里面
yum install epel-release -y
yum install cmake3 -y
二:Please do not build in-source. Out-of source builds are highly
1.在mysql源码根目录下新建build:mkdir -p build
2.切换build目录:cd build/
3.将cmake3. 换成 cmake3.. 执行编译命令即可,不再报错
三:GCC 5.3 or newer is required (-dumpversion says 4.8.5)
升级GCC 要求 >5.3

cd gcc-9.1.0 ./contrib/download_prerequisites 
如果不成功可以手动下载依赖
yum install gmp-devel // 編譯依賴此庫  yum install mpfr-devel // 編譯依賴此庫  yum install libmpc-devel // 編譯依賴此庫  当然以上库可以在ftp://gcc.gnu.org/pub/gcc/infrastructure/下载

isl 选择安装(我执行./contrib/download_prerequisites成功,没有安装这个文件) 下载isl-0.18.tar.bz2 // yum 没有这个库源码安装 wget ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2
tar -jxvf isl-0.18.tar.bz2
cd isl-0.18 ./configure   
make  
make install 
mkdir gcc-build-9
cd gcc-build-9 
yum groupinstall "Development Tools" yum install glibc-static libstdc++-static(这两个是必要的开发环境) ../configure --prefix=/usr/local/gcc9 --enable-languages=c,c++,go --disable-multilib // 指定gcc9安裝地址,

# ln -s /usr/local/gcc/bin/gcc /usr/bin/gcc

# ln -s /usr/local/gcc/bin/c++ /usr/bin/c++

# ln -s /usr/local/gcc/bin/g++ /usr/bin/g++

# ln -s /usr/local/gcc/lib64/libstdc++.so.6.0.22 /usr/lib64/libstdc++.so.6


mysql添加用户并放开权限
mysql>CREATE USER 'finley'@'localhost' IDENTIFIED BY 'some_pass'; mysql>GRANT ALL PRIVILEGES ON *.* TO 'finley'@'localhost' WITH GRANT OPTION;

mysqladmin -u用户名 -p旧密码 password 新密码

/usr/local/mysql/bin/mysqld --initialize-insecure --user=root --basedir=/usr/local/mysql --datadir=/config/mysql/data

数据库错误统计:
ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

在my.cnf里面设置

log-bin-trust-function-creators=1

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 3678 (HY000) at line 1: Schema directory './zabbix' already exists. This must be resolved manually (e.g. by moving the schema directory to another location).
[root@localhost mysql]# rm -rf zabbix/


=================================================
select @@GLOBAL.sql_mode

1.开启与关闭Strict Mode方法

找到安装目录下的my.cnf(windows系统则是my.ini)文件

sql_mode中加入STRICT_TRANS_TABLES则表示开启严格模式,如没有加入则表示非严格模式,修改后重启mysql即可

例如这就表示开启了严格模式:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

=======================================================
SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%';
[mysqld] character-set-server=utf8mb4 [mysql] default-character-set=utf8mb4 [client] default-character-set=utf8mb4
=========================================================
sed -i "s/oldstring/newstring/g" `grep oldstring -rl yourdir`
=============================================

libmysql的C语言库下载
阅读(2497) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~