深度系统如何安装mysql_deepin 安装mysql apache
发布日期:2021-06-24 16:13:06 浏览次数:2 分类:技术文章

本文共 1122 字,大约阅读时间需要 3 分钟。

# 如果MYSQL安装成功,就会有my-medium.cnf

cp /usr/local/src/mysql-5.5.17/support-files/my-medium.cnf

/etc/my.cnf

# 设置权限

chmod +x /usr/local/mysql

chown -R mysql:mysql /usr/local/mysql

# 配置开机自启动

cp support-files/mysql.server /etc/init.d/mysqld

chmod +x /etc/init.d/mysqld

chkconfig --add mysqld

chkconfig mysqld on

# 修改my.cnf配置

vim /etc/my.cnf

# [mysqld] 添加:

datadir=/usr/local/mysql/data

default-storage-engine=MyISAM

# 初始化数据库

/usr/local/mysql/scripts/mysql_install_db --user=mysql

--basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

&

# 启动MySQL

/usr/local/mysql/bin/mysqld_safe –defaults-file=/etc/my.cnf

&

或者:

/etc/init.d/mysqld start (service mysqld start)

# 测试MySQL是否启动

# 1)查看是否有进程mysql

ps -ef | grep mysql

# 2)查看端口是否运行

netstat -tnl | grep 3306

# 3)读取mysql版本信息

/usr/local/mysql/bin/mysqladmin version

# 4) 登录mysql

/usr/local/mysql/bin/mysql -u root

# 至此,MySQL安装完成

解压: httpd.tar.gz tar -zxf httpd.tar.gz

配置:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql

安装:

make && make install

快速启动配置:

ln -s /usr/local/apache/bin/apachectl /sbin/apache

apache

start|stop|restart

转载地址:https://blog.csdn.net/weixin_33744799/article/details/114020948 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:自动清理mysql的lock进程的脚本_自动清理MySQL的Lock进程的脚本
下一篇:mysql与django交互_django与mysql交互

发表评论

最新留言

路过按个爪印,很不错,赞一个!
[***.219.124.196]2024年04月18日 15时22分05秒