当前位置:网站首页>linux mysql操作的相关命令
linux mysql操作的相关命令
2022-08-09 10:45:00 【'LYong】
1、查看是否安装mysql:service mysqld start
如果安装则如图:
如果没有安装:mysqld:未被识别的服务
2、查看mysql的安装路径:ps -ef | grep mysql
www/server/bin/mysql 是指:mysql的运行路径
www/server/data 是指:mysql数据库文件的存放路径
www/server/lib/mysql 是指:mysql的安装路径
3、打开、关闭mysql服务:
service mysql start //打开
service mysql stop //关闭
service mysql restart //重启
4、导入mysql环境变量(解决: -bash: mysql: command not found):
find / -name profile #找到profile文件,一般该文件在 /etc/profile 这里
vi profile #编辑该文件
export PATH="$PATH:/www/server/mysql/bin" #按enter键加在最底部
按ESC键退出,输入 :wq 进行保存
source /etc/profile #更新配置(不用重启系统)
之后你在执行 就 OK啦!
5、查看mysql的版本: mysql -v
6、以及whereis mysql which mysql 后续在补充 。。。
边栏推荐
猜你喜欢
Electron application development best practices
笔记本电脑使用常见问题,持续更新
Netscope:神经网络结构在线可视化工具
Oracle数据库常用函数总结
shap库源码和代码实现
The common problems in laptops, continuously updated
人物 | 从程序员到架构师,我是如何快速成长的?
[Error record] Solve the problem that ASRock J3455-ITX cannot be turned on without a monitor plugged in
RTP
批量转换经纬度的网页实现方法
随机推荐
cnn的输入输出
Oracle数据库:for update 和for update nowait的区别
OpenGL 2.0编程例子
Received your first five-figure salary
stimulus.js 初体验
【原创】解决阿里云oss-browser.exe双击没反应打不开,提供一种解决方案
乘积量化(PQ)
深度学习--循环神经网络(Recurrent Neural Network)
ESIM(Enhanced Sequential Inference Model)- 模型详解
Unix Environment Programming Chapter 15 15.7 Message Queuing
jvm-类加载系统
解决1.tensorflow运行使用CPU不使用GPU 2.tensorflow环境下的GPU版本号 3.tensorflow和cuda以及cudnn版本对应问题 4.查看cuda和cudnn版本
1002 写出这个数 (20 分)
Unix Environment Programming Chapter 14 14.8 Memory Mapped I/O
UNIX Environment Programming Chapter 15 15.5FIFO
[华为云在线课程][SQL语法分类][数据操作][学习笔记]
数据存储:对dataframe类,使用to_csv()将中文数据写入csv文件
activemq 消息持久化
OpenSSF的开源软件风险评估工具:Scorecards
Solve the ali cloud oss - the original 】 【 exe double-click response can't open, to provide a solution