Loading...

Fedora24installMySQL

I have work with mysql on the fedora OS, but currently fedora have no support mysql instead or mariadb. So I gotta install it.

Install Database


dnf install mariadb mariadb-server -y

Run Database

run the database when you start system ~


systemctl enable mariadb

Run the database right now!


systemctl start mariadb

Configure Database

Because, we have user name as root but NO password for now. so create password for root user.

select user,host,password from mysql.user;
delete from mysql.user where user='root' and host='::1';
delete from mysql.user where user='';
set password for root@localhost=password('your password');
set password for root@'127.0.0.1'=password('your password');

install mysql-python

sudo dnf install redhat-rpm-config

Now , you can install mysql-python for python.

pip install mysql-python

原文链接:https://www.cnblogs.com/landpack/p/5787378.html
本文来源 爱码网,其版权均为 原网址 所有 与本站无关,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源。

© 版权声明

相关文章