Centos安装php-7.3.5,运行Mysql部分报错记录

php安装过程中各种报错

1.error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make && make install

2.ERROR: cannot verify nih.at’s certificate, issued by ‘/C=US/O=Let’s Encrypt/CN=R3’: Issued certificate has expired. To connect to nih.at insecurely, use `–no-check-certificate’.

sudo yum install -y ca-certificates
wget --no-check-certificate https://xxxxx

3.configure: error: off_t undefined; check your library configuration

echo '/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64'>>/etc/ld.so.conf&&ldconfig -v

4.yum报错意外终止

yum upgrade --skip-broken

5.configure: error: Unable to locate gmp.h

yum install gmp-devel

6.fatal error: zipconf.h: No such file or directory

cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h

7.cc: internal compiler error: Killed (program cc1)

sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile

完成后

sudo swapoff /swapfile
sudo rm /swapfile

8.mysql -uroot -p
bash: mysql: command not found…

系统默认会查找/usr/bin下的命令
mysql的路径是:/usr/local/mysql/bin/mysql

ln -s /usr/local/mysql/bin/mysql /usr/bin

9.mysql -u root -p
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)

跳过密码-设置密码

/etc/mysql.conf

添加
[mysqld]
skip-grant-tables
保存

sudo service mysql restart

不输入密码回车进入

flush privileges;
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘密码’
quit

/etc/mysql.conf 删除 skip-grant-tables

sudo service mysql restart
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值