当前位置:网站首页>Linux(CentOS6)安装MySQL5.5版本数据库
Linux(CentOS6)安装MySQL5.5版本数据库
2022-06-12 01:44:00 【我先测了】
环境准备
Linux(CentOS)、安装MySQL5.5,网上找过了好多资料,都需要一一验证,安装是否成功,
也欢迎验证指正我的安装步骤;
1、到mysql官网下载mysql编译好的二进制安装包,在下载页面Select Platform:选项选择linux-generic,然后把页面拉到底部,64位系统下载Linux - Generic (glibc 2.5) (x86, 64-bit),32位系统下载Linux - Generic (glibc 2.5) (x86, 32-bit)
2、解压64位mysql二进制安装文件: tar -xvf mysql-5.5.52-linux2.6-x86_64.tar.gz;
3、复制解压后的mysql目录到系统的本地软件目录:执行命令:cp mysql-5.6.17-linux-glibc2.5-i686 /usr/local/mysql -r
注意:目录结尾不要加/
4、添加系统mysql组和mysql用户:执行命令:groupadd mysql和useradd -r -g mysql mysql
5、安装数据库:
进入安装mysql软件目录:执行命令 cd /usr/local/mysql
修改当前目录拥有者为mysql用户:执行命令 chown -R mysql:mysql ./
安装数据库:执行命令 ./scripts/mysql_install_db --user=mysql
修改当前目录拥有者为root用户:执行命令 chown -R root:root ./
修改当前data目录拥有者为mysql用户:执行命令 chown -R mysql:mysql data
6、启动mysql服务和添加开机启动mysql服务:
添加开机启动:执行命令cp support-files/mysql.server /etc/init.d/mysql,把启动脚本放到开机初始化目录
启动mysql服务:执行命令service mysql start
执行命令:ps -ef|grep mysql 看到mysql服务说明启动成功,如图
7、修改mysql的root用户密码,root初始密码为空的:执行命令:./bin/mysqladmin -u root password ‘密码’
8、把mysql客户端放到默认路径:ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
注意:建议使用软链过去,不要直接包文件复制,便于系统安装多个版本的mysql
9_、使用命令,让windows远程访问linux-MySQL数据库_
mysql>grant all privileges on *.* to [email protected]“%” identified by “root”;
//使修改生效
mysql>FLUSH PRIVILEGES;
边栏推荐
- lua 函数
- Invert words in a string (split, double ended queue)
- 括号生成(回溯)
- "It's safer to learn a skill!" The little brother of Hangzhou campus changes to software testing, and likes to mention 10k+ weekend!
- Google Ads 的优势
- 如何最大化的利用各种匹配方式? ——Google SEM
- “還是學一門技術更保險!”杭州校區小哥哥轉行軟件測試,喜提10K+雙休!
- Unit tests in golang
- 2022年金属非金属矿山(小型露天采石场)安全管理人员考试模拟100题及模拟考试
- 颠倒字符串中的单词(split、双端队列)
猜你喜欢

“还是学一门技术更保险!”杭州校区小哥哥转行软件测试,喜提10K+双休!

Blog recommended | bookkeeper - Apache pulsar high availability / strong consistency / low latency storage implementation

竞价广告每次点击出价多少钱是固定的吗?

kali安装empire过程中遇到的各种报错解决方案

西南林业大学“西林链”通过工信部电子标准院功能测试 | FISCO BCOS案例

Markov networks and conditional random fields

Recursive and non recursive transformation

Annotate your own point cloud dataset with labelcloud open source tool as a tutorial of Kitti annotation format (support PCD and bin point clouds)

Kmeans from 0 to 1

The road of global evolution of vivo global mall -- multilingual solution
随机推荐
Prism框架初识-模块化介绍
【项目实训】jwt
Database
“还是学一门技术更保险!”杭州校区小哥哥转行软件测试,喜提10K+双休!
Tabulation v.s. Recursion With Memory (Dynamic Programming)
华为联运游戏或应用审核驳回:应用检测到支付serviceCatalog:X6
LeetCode Algorithm 997. 找到小镇的法官
[从零开始学习FPGA编程-20]:快速入门篇 - 操作步骤4-2-Altera Quartus II工具的快速使用(modelSim联合仿真、程序下载到Altera开发板)
2022 tool fitter (Advanced) recurrent training question bank and online simulation examination question bank source: YiDianTong official account of safety production simulation examination
感知机从0到1
Three line code solution - Maximum sub segment and - DP
LeetCode Algorithm 997. Find the town judge
Unity頂點動畫的陰影實現
[C language] C language file operation | C language file reading and writing | single character reading and writing | string reading and writing | format reading and writing | binary form reading and
[从零开始学习FPGA编程-19]:快速入门篇 - 操作步骤4-1- Verilog 软件下载与开发环境的搭建- Altera Quartus II版本
Linux(CentOS7)安装MySQL-5.7版本
Simplified interpretation of accuracy and recall in AI papers
[learn FPGA programming from scratch -19]: quick start chapter - operation steps 4-1- Verilog software download and construction of development environment - Altera quartz II version
MP3 to Wav to Midi
php安全开发 12博客系统的 系统模块信息的修改