Linux下Mysql安装_问题_解决

本文解决了在Linux环境下安装MySQL过程中遇到的多个问题,包括无法创建事务锁、找不到MySQL头文件及使用rpm包安装Ubuntu版MySQL Server时出现的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

Just saved here~I'll perfect it next time~

 

1. can't create transaction lock on /var/lib/rpm/__db.000
solution:
touch /var/lib/rpm/__db.000
chown root:root /var/lib/rpm/__db.000
chmod 644 /var/lib/rpm/__db.000
#We must exe it with the root user or use the command 'sudo'
sudo touch /var/lib/rpm/__db.000
sudo chown root:root /var/lib/rpm/__db.000
sudo chmod 644 /var/lib/rpm/__db.000

#to see the whole name of the process \
$rpm -qa | grep MySQL
#use param -e to remove the process
$rpm -e xxx

2. Cannot find MySQL header files
#It is the header files named 'mysql*.h' not found in the environment or not bounded.
please reinstall the mysql and we should guess the setup-order the mysql-developer did.
So the order is mysql-server mysql-client mysql-devel.

 

3. 在Ubuntu下安装mysql5.5server的rpm会出错

error: incorrect format: unknown tag
chown: cannot access `MySQL-server-5.1.43//etc/my.cnf': No such file or directory
failed chowning /etc/my.cnf to 0:0: Illegal seek at /usr/share/perl5/Alien/Package/Rpm.pm line 265, <GETPERMS> line 3.

碰到这个问题很无奈,ubuntu自己的问题了。

看了看perl的脚本,根本就没有my.cnf这个文件,肯定报错了。之后我自己建立了一个my.conf文件,仍然没有用。

解决方法:

只好用ubuntu自己的傻瓜安装了:

june@june-desktop:~/Downloads$ sudo apt-get install mysql-server

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值