centos6.6 mysql_Centos6.6 下安装mysql

news/2024/7/24 8:09:30 标签: centos6.6 mysql

安装mysql

yum -y install mysql-server mysql-devel libcurl-devel net-snmp-devel php php-gd php-xml php-mysql  httpd

service mysqld start

CentOS 如何修改mysql 用户root的密码

第一步:用帐号登录mysql

[root@CentOs ~]# mysql -u root

或# mysql -uroot -p

第二步:改变用户数据库

mysql> use mysql

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

第三步:修改密码,记得密码要用password()函数进行加密,一定不要忘记!!!

mysql> update user set password=password('qwe123') where user='root';

Query OK, 1 row affected (0.04 sec)

Rows matched: 1  Changed: 1  Warnings: 0

第四步:刷新权限表

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

第五步:退出mysql

mysql> quit

Bye

第六步:对mysql进行重启

[root@CentOs ~]# service mysqld restart;


http://www.niftyadmin.cn/n/1469209.html

相关文章

吊装 分析 软件_我如何理解js中的吊装

吊装 分析 软件Take a look at the code below:看下面的代码: function bigDoll() { function littleDoll() { return i am little } return littleDoll() function littleDoll() { return no I am little! }}bigDoll()What do you think will be the r…

ibatis 获取新增id mysql_ibatis插入数据返回ID的方法

很基础的知识了&#xff0c;贴过来备忘一下 主要就是利用seelctkey来获取这个ID值&#xff0c;但是oracle和mysql的区别还是很大的 oracle的用法 1 <insert id"insertOperation"> 2 <selectKey resultClass"long" keyProperty"Id" >…

SeleniumJava vs testcafe javascript第一部分

A comparison between Selenium and TestCafeSelenium和TestCafe的比较 Many articles compare Selenium and TestCafe test frameworks, but few of them compare these frameworks’ specific features through task execution. In this article, I will show you how to ex…

java遍历list去重_Java中List集合去除重复数据的方法汇总

List集合概述List集合是一个元素有序(每个元素都有对应的顺序索引&#xff0c;第一个元素索引为0)、且可重复的集合。List集合常用方法List是Collection接口的子接口&#xff0c;拥有Collection所有方法外&#xff0c;还有一些对索引操作的方法。void add(int index, E element…

php 转换成string,php中object如何转换成string

php中object如何转换成string发布时间&#xff1a;2020-09-01 16:03:02来源&#xff1a;亿速云阅读&#xff1a;95作者&#xff1a;小新这篇文章主要介绍php中object如何转换成string&#xff0c;文中介绍的非常详细&#xff0c;具有一定的参考价值&#xff0c;感兴趣的小伙伴们…

javascript面试_我的模拟面试中的5个JavaScript技术问题

javascript面试As I prepare for the many technical interviews ahead of me, I decided to share some of the questions that arose during my recent mock technical interview. In the end they all turned out to be much easier than I had thought and gave me more co…

php 图片无法删除,php如何删除指定图片

php删除指定图片的方法&#xff1a;首先读取数据库头像的URL地址&#xff1b;然后获取URL地址的有效字段&#xff1b;接着设置file文件路径&#xff1b;最后通过unlink函数删除图片文件即可。推荐&#xff1a;《PHP视频教程》php 删除服务器指定目录图片使用场景&#xff1a;新…

为什么我不能用tiktok_tiktok如何给我完美的编码方面的项目

为什么我不能用tiktokAs a computer science student, I am always looking for another cool side project to keep me busy. These ideas for side projects can come from anywhere; sometimes from the places you least expect.作为计算机科学专业的学生&#xff0c;​​我…