下载最新的mysql二进制版本,查看包下的文件
[root@my-desktop]# tar -tvf MySQL-5.5.10-1.linux2.6.i386.tar
解压
[root@my-desktop]# tar -xvf MySQL-5.5.10-1.linux2.6.i386.tar
MySQL-clientr-5.5.10-1.linux2.6.i386.rpm
MySQL-devel-5.5.10-1.linux2.6.i386.rpm
MySQL-embedded-5.5.10-1.linux2.6.i386.rpm
MySQL-server-5.5.10-1.linux2.6.i386.rpm
MySQL-shared-5.5.10-1.linux2.6.i386.rpm
MySQL-test-5.5.10-1.linux2.6.i386.rpm
使用 rpm命令安装 ,提示
下載rpm
[root@my-desktop]#sudo apt-get install rpm
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
正在分析软件包的依赖关系树
rpm
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 390 个软件包未被升级。
[root@my-desktop]#rpm -i MySQL-server-5.5.10-1.linux2.6.i386.rpm
rpm: please use alien to install rpm packages on Debian, if you are really sure use --force-debian switch. See README.Debian for more details.
下載alien
sudo apt-get install alien
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
正在分析软件包的依赖关系树
alien
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 390 个软件包未被升级。
将rpm转换 为deb文件
sudo alien MySQL-server-5.5.10-1.linux2.6.i386.rpm
error: incorrect format: unknown tag
Warning: Skipping conversion of scripts in package MySQL-server: postinst preinst prerm
Warning: Use the --scripts parameter to include the scripts.
完成 后 会 出现 同名的 mysql-server_5.5.10-2_i386.deb文件
dpkg -i mysql-server_5.5.10-2_i386.deb
(正在读取数据库 ... 系统当前总共安装有 127642 个文件和目录。)
正预备替换 mysql-server 5.5.10-2 (使用 mysql-server_5.5.10-2_i386.deb) ...
正在解压缩将用于更替的包文件 mysql-server ...
正在设置 mysql-server (5.5.10-2) ...
正在处理用于 install-info 的触发器...
正在处理用于 man-db 的触发器...
正在处理用于 ureadahead 的触发器...
正在处理用于 libc-bin 的触发器...
ldconfig deferred processing now taking place
安装完成
sudo cp /usr/share/mysql/my-small.cnf my.cnf
启动mysql
root@vieri-desktop:/var/lib/mysql# /usr/sbin/mysqld -u root
/usr/sbin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
需要下载libaio1
root@vieri-desktop:/var/lib/mysql# sudo apt-get install libaio1
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
libaio1
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 390 个软件包未被升级。
需要下载 9,512B 的软件包。
解压缩后会消耗掉 77.8kB 的额外空间。
获取:1 http://hk.archive.ubuntu.com/ubuntu/ lucid/main libaio1 0.3.107-3ubuntu2 [9,512B]
下载 9,512B,耗时 2秒 (3,907B/s)
选中了曾被取消选择的软件包 libaio1。
(正在读取数据库 ... 系统当前总共安装有 127634 个文件和目录。)
正在解压缩 libaio1 (从 .../libaio1_0.3.107-3ubuntu2_i386.deb) ...
正在设置 libaio1 (0.3.107-3ubuntu2) ...
正在处理用于 libc-bin 的触发器...
ldconfig deferred processing now taking place
完成
root@vieri-desktop:/var/lib/mysql# /usr/sbin/mysqld -u root
110330 17:15:53 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
110330 17:15:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110330 17:15:53 InnoDB: The InnoDB memory heap is disabled
110330 17:15:53 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110330 17:15:53 InnoDB: Compressed tables use zlib 1.2.3
110330 17:15:53 InnoDB: Using Linux native AIO
110330 17:15:53 InnoDB: Initializing buffer pool, size = 128.0M
110330 17:15:54 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
110330 17:15:54 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
110330 17:15:54 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
110330 17:15:54 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
110330 17:15:54 InnoDB: Waiting for the background threads to start
110330 17:15:55 InnoDB: 1.1.5 started; log sequence number 0
110330 17:15:56 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
提示是指系统表不存在 ,需要初始化数据库
root@vieri-desktop:/var/lib/mysql# mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h vieri-desktop password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
完成
root@vieri-desktop:/usr/local/mysql# groupadd mysql
root@vieri-desktop:/usr/local/mysql# useradd -g mysql mysql
启动 mysqld -u mysql
root@vieri-desktop:/usr/local/mysql# mysqld -u mysql
110331 11:38:40 [Note] Plugin 'FEDERATED' is disabled.
110331 11:38:40 InnoDB: The InnoDB memory heap is disabled
110331 11:38:40 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110331 11:38:40 InnoDB: Compressed tables use zlib 1.2.3
110331 11:38:40 InnoDB: Using Linux native AIO
110331 11:38:40 InnoDB: Initializing buffer pool, size = 128.0M
110331 11:38:40 InnoDB: Completed initialization of buffer pool
110331 11:38:40 InnoDB: highest supported file format is Barracuda.
110331 11:38:40 InnoDB: Waiting for the background threads to start
110331 11:38:41 InnoDB: 1.1.5 started; log sequence number 1595675
110331 11:38:42 [Note] Event Scheduler: Loaded 0 events
110331 11:38:42 [Note] mysqld: ready for connections.
Version: '5.5.10' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
记得/etc/my.cnf的权限为mysql用戶,否则启动异常
root@vieri-desktop:/usr/sbin# mysql -u mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
停止进程
root@vieri-desktop:/home/vieri# ps aux | grep mysql
vieri 2511 0.5 2.5 78216 26072 ? S 15:35 0:33 gedit /home/vieri/temp/mysql安装
root 8796 0.2 3.0 290356 31248 pts/2 Sl+ 17:14 0:00 mysqld -u root
root 8868 0.0 0.0 3320 816 pts/0 S+ 17:16 0:00 grep --color=auto mysql
root@vieri-desktop:/home/vieri# kill 8796
root@vieri-desktop:/home/vieri# ps aux | grep mysql
vieri 2511 0.5 2.5 79240 26112 ? Sl 15:35 0:36 gedit /home/vieri/temp/mysql安装
root 8897 0.0 0.0 3320 816 pts/0 S+ 17:20 0:00 grep --color=auto mysql
利用腳本启动
root@vieri-desktop:/var/lib/mysql# /etc/init.d/mysql start
Starting MySQL *
利用程序启动守护线程
root@vieri-desktop:/var/lib/mysql# mysqld_safe -u mysql &
[1] 7595s
root@vieri-desktop:/var/lib/mysql# 110407 16:28:49 mysqld_safe Logging to '/var/lib/mysql/vieri-desktop.err'.
110407 16:28:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110407 16:30:29 mysqld_safe mysqld from pid file /var/lib/mysql/vieri-desktop.pid ended
^C
[1]+ Done mysqld_safe -u mysql
参考http://www.gagahappy.com/ubuntu-mysql-add-to-service/设置开机启动
root@vieri-desktop:/home/vieri# cp usr/share/mysql/mysql.server /etc/init.d/mysql
root@vieri-desktop:/home/vieri# chmod +x /etc/init.d/mysql
chkconfig -add mysql命令报错
用ubantu带的update-rc.d命令添加自启动
root@vieri-desktop:/home/vieri# cd /etc/init.d
root@vieri-desktop:/etc/init.d# update-rc.d mysql defauts
update-rc.d: warning: mysql start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: mysql stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
-n: not really
-f: force
添加
root@vieri-desktop:/etc/init.d# update-rc.d mysql defaults
Adding system startup for /etc/init.d/mysql ...
/etc/rc0.d/K20mysql -> ../init.d/mysql
/etc/rc1.d/K20mysql -> ../init.d/mysql
/etc/rc6.d/K20mysql -> ../init.d/mysql
/etc/rc2.d/S20mysql -> ../init.d/mysql
/etc/rc3.d/S20mysql -> ../init.d/mysql
/etc/rc4.d/S20mysql -> ../init.d/mysql
/etc/rc5.d/S20mysql -> ../init.d/mysql
查看启动
root@vieri-desktop:/etc/init.d# chkconfig --list mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
删除
The disable|enable API is not stable and might change in the future.
root@vieri-desktop:/etc/init.d# update-rc.d -f mysql remove
Removing any system startup links for /etc/init.d/mysql ...
/etc/rc0.d/K20mysql
/etc/rc1.d/K20mysql
/etc/rc2.d/S20mysql
/etc/rc3.d/S20mysql
/etc/rc4.d/S20mysql
/etc/rc5.d/S20mysql
/etc/rc6.d/K20mysql
分享到:
相关推荐
其次,如果你在Ubuntu系统上使用`easy_install`或`pip`安装MySQL-Python,可能会遇到编译错误,如`command ‘gcc’ failed with exit status 1`。这是因为缺少了Python的开发包。你可以通过运行以下命令来安装: ``...
- Debian/Ubuntu: `apt-get install libaio-dev` - RedHat/Fedora/Oracle Linux: `yum install libaio-devel` - SuSE: `zypper install libaio-devel` 然而,即使用户已经安装了libaio-devel,错误仍然存在,这是...
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
wrf转mp4播放器1.1.1
内容概要:本文档详细介绍了如何在Simulink中设计一个满足特定规格的音频带ADC(模数转换器)。首先选择了三阶单环多位量化Σ-Δ调制器作为设计方案,因为这种结构能在音频带宽内提供高噪声整形效果,并且多位量化可以降低量化噪声。接着,文档展示了具体的Simulink建模步骤,包括创建模型、添加各个组件如积分器、量化器、DAC反馈以及连接它们。此外,还进行了参数设计与计算,特别是过采样率和信噪比的估算,并引入了动态元件匹配技术来减少DAC的非线性误差。性能验证部分则通过理想和非理想的仿真实验评估了系统的稳定性和各项指标,最终证明所设计的ADC能够达到预期的技术标准。 适用人群:电子工程专业学生、从事数据转换器研究或开发的技术人员。 使用场景及目标:适用于希望深入了解Σ-Δ调制器的工作原理及其在音频带ADC应用中的具体实现方法的人群。目标是掌握如何利用MATLAB/Simulink工具进行复杂电路的设计与仿真。 其他说明:文中提供了详细的Matlab代码片段用于指导读者完成整个设计流程,同时附带了一些辅助函数帮助分析仿真结果。
国网台区终端最新规范
《基于YOLOv8的智慧农业水肥一体化控制系统》(包含源码、可视化界面、完整数据集、部署教程)简单部署即可运行。功能完善、操作简单,适合毕设或课程设计
GSDML-V2.33-LEUZE-AMS3048i-20170622.xml
微信小程序项目课程设计,包含LW+ppt
微信小程序项目课程设计,包含LW+ppt
终端运行进度条脚本
幼儿园预防肺结核教育培训课件资料
python,python相关资源
《基于YOLOv8的智慧校园电动车充电桩状态监测系统》(包含源码、可视化界面、完整数据集、部署教程)简单部署即可运行。功能完善、操作简单,适合毕设或课程设计
deepseek 临床之理性软肋.pdf
SM2258XT量产工具(包含16种程序),固态硬盘量产工具使用
RecyclerView.zip
水务大脑让水务运营更智能(23页)
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
大众捷达轿车前轮制动器设计