iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >mysql数据库基础命令结尾
  • 203
分享到

mysql数据库基础命令结尾

2024-04-02 19:04:59 203人浏览 薄情痞子
摘要

27 使用Mysqladmin 关闭数据库mysqladmin -uroot -poldboy123 shutdownps -ef |grep mysql28 mysql忘记密码重新修改密码过程:mysql

27 使用Mysqladmin 关闭数据库

mysqladmin -uroot -poldboy123 shutdown
ps -ef |grep mysql

28 mysql忘记密码重新修改密码过程:

mysql> mysqld_safe --skip-grant-tables --user=mysql --defaults-file=/data/3306/my.cnf >/dev/null &

    -> mysqld_safe --skip-grant-tables --user=mysql  >/dev/null &

    -> update mysql.user set  passWord=password("oldboy111") where user='root' and host='localhost';

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL Server version for the right syntax to use near 'mysqld_safe --skip-grant-tables --user=mysql --defaults-file=/data/3306/my.cnf >' at line 1

mysql> update mysql.user set  password=password("oldboy111") where user='root' and host='localhost';

Query OK, 1 row affected (0.35 sec)

Rows matched: 1  Changed: 1  Warnings: 0


mysql> Terminated


在此 ,重新开启一个窗口杀掉mysql 注意!千万不要用kill-9 粗暴的杀死mysql,这样会导致数据库丢数据后果将非常严重

ill mysql

[root@root ~]# pkill mysql

[root@root ~]# pkill mysql

[root@root ~]# pkill mysql

[root@root ~]# pkill mysql

[root@root ~]# pkill mysql

[root@root ~]# pkill mysql

[root@root ~]# pkill mysql



[root@root ~]# /etc/init.d/mysqld start

Starting MySQL.... SUCCESS! 

[root@root ~]# ps -ef | grep mysql

root      10974      1  0 18:39 pts/2    00:00:00 /bin/sh /application/mysql/bin/mysqld_safe --datadir=/application/mysql/data --pid-file=/application/mysql/data/root.pid

mysql     11148  10974  3 18:39 pts/2    00:00:00 /application/mysql/bin/mysqld --basedir=/application/mysql --datadir=/application/mysql/data --plugin-dir=/application/mysql/lib/plugin --user=mysql --log-error=/application/mysql/data/root.err --pid-file=/application/mysql/data/root.pid

root      11181  10136  0 18:39 pts/2    00:00:00 grep mysql

[root@root ~]# mysql -uroot -poldboy111

Warning: Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 4

Server version: 5.6.34-log MySQL CommUnity Server (GPL)


Copyright (c) 2000, 2016, oracle and/or its affiliates. All rights reserved.


Oracle is a reGIStered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> \q

Bye

[root@root ~]# mysql -uroot -poldboy111

Warning: Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 6

Server version: 5.6.34-log MySQL Community Server (GPL)


Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> 


您可能感兴趣的文档:

--结束END--

本文标题: mysql数据库基础命令结尾

本文链接: https://www.lsjlt.com/news/44952.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • mysql数据库查询基础命令详解
    目录1.启动数据库命令行客户端2.查询数据库3.进入数据库3.查询所在数据库中所有表信息4.查询数据库某张表结构5.简单select查询语句(单张表)5.1查询单张表所有数据5.2 LIMIT限制查询结果返回数...
    99+
    2022-11-19
    mysql数据库查询命令 mysql数据库查询 mysql数据库命令
  • MySQL数据库基础操作命令有哪些
    这篇文章给大家分享的是有关MySQL数据库基础操作命令有哪些的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。1、使用帮助信息登陆数据库就不介绍了哦,比如说想做创建的数据库的操作,不...
    99+
    2024-04-02
  • MySQL数据库基本命令
    本篇内容介绍了“MySQL数据库基本命令”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!1.创建数据库  C...
    99+
    2024-04-02
  • mysql 库基础命令汇总
    1 登录mysql数据库[root@db02--52 ~]# mysql -uroot -pEnter password: Welcome to the MySQL monitor.  ...
    99+
    2024-04-02
  • MySQL 基础常用命令总结
    目录MySQL 基础常用命令 1. SQL语句2. 建表3.字段属性4.修改表:alter table5. 增删改查:字符串全部使用''包起来 5.1 增5.2 删5.3 改5.4 ...
    99+
    2024-04-02
  • MySQL数据库中有哪些基础操作命令
    这篇文章给大家介绍MySQL数据库中有哪些基础操作命令,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。用户与权限创建用户mysql>create user te...
    99+
    2024-04-02
  • MySQL数据库常用命令小结
    目录1.对数据库常用命令2.数据库中对表的命令插入数据数据查询常用函数模糊查询多表连接查询1.对数据库常用命令 1.连接数据库mysql -u用户名 -p密码2.显示已有数据库sho...
    99+
    2023-01-12
    MySQL数据库命令 MySQL命令
  • Mysql数据库常用命令总结
    本篇内容介绍了“Mysql数据库常用命令总结”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!  启动Mysq...
    99+
    2024-04-02
  • linux下mysql数据库基础及客户端命令详解
    linux下mysql数据库基础及客户端命令详解1.mysql数据库存储引擎: SHOW ENGINES;   #查看mysql支持的存储引擎常见有如下两个存储引擎:MyISAM:每表三...
    99+
    2024-04-02
  • 【数据库】MySQL表的增删改查(基础命令详解)
    目录 1.CRUD 2.新增(CREATE)  2.1 单行数据 + 全列插入 2.2 多行数据 + 指定列插入  3.查询(SELECT) 3.1全列查询 3.2指定列查询 3.3 查询字段为表达式 3.4别名 3.5去重 3.6 排序:...
    99+
    2023-09-29
    mysql 数据库 java
  • 【MySQL】 MySQL数据库基础
    文章目录 🐱‍👓数据库的操作📌显示当前的数据库📌创建数据库🎈语法:🎈语法说明🎈示...
    99+
    2023-09-18
    数据库 mysql 基础操作 oracle
  • 【MySQL】数据库基础
    文章目录 1. 登陆选项的认识2. 什么是数据库3. 存储数据为什么不用文件?4. 见一见数据库创建数据库创建表 5. SQL语句分类6. 查看MysQL存储引擎 1. 登陆选项的认识...
    99+
    2023-10-18
    数据库 mysql
  • Linux基础命令---mysql
    mysqlmysql是一个简单的sql shell,它可以用来管理mysql数据库。此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、Fedora。 1、语法mysql [options] ...
    99+
    2023-06-05
  • Linux基础命令---mysqladmin数据库管理工具
    mysqladminmysqladmin是mysql数据库的管理工具,可以控制、查看、修改数据库服务器的配置和状态。此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、Fedora。 1、语法mysqladmin...
    99+
    2023-06-05
  • MySQL学习之基础命令实操总结
    目录启动mysql服务连接mysql常用命令DatabaseTable启动mysql服务 (以管理员身份运行cmd) net start mysql 连接mysql mysql -...
    99+
    2024-04-02
  • MySQL数据库命令
    MySQL数据库命令 一、数据库 1、创建数据库create database 数据库名2、查看数据库show databases;查看所有的数据库show create database 数据库名;查看指定数据库3、删除数据库dro...
    99+
    2023-08-18
    数据库 mysql sql
  • MySQL数据库灾备的基础知识总结
    这篇文章主要讲解了“MySQL数据库灾备的基础知识总结”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“MySQL数据库灾备的基础知识总结”吧!一、数据备份捷径因为这个方法没有得到官方正式文档的...
    99+
    2023-06-17
  • MySQL数据库备份的基础知识总结
    本篇内容介绍了“MySQL数据库备份的基础知识总结”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!一、数据备...
    99+
    2024-04-02
  • MySQL数据库管理常用命令总结
    这篇文章主要讲解了“MySQL数据库管理常用命令总结”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“MySQL数据库管理常用命令总结”吧!安装利用RPM包安装...
    99+
    2024-04-02
  • [基础学习]MySQL常用语句命令总结
      前言 相信平时大家在开发时都会使用MySQL数据库,它是目前比较火的一款数据库工具,对于大多数企业的业务来说,MySQL可以很完美地支持了。 很多时候我们都是借助mysql可视化工具操作mysql,虽然说是比较方便,但是记住一些常用的...
    99+
    2023-01-31
    语句 命令 常用
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作