Ubuntu18.04换源 sudo mv /etc/apt/sources.list /etc/apt/sourses.list.backup vim /etc/apt/sources.list #清华源 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
2、允许mysql远程访问,可以使用以下三种方式: a、改表。 mysql -u root –p mysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>select host, user from user;
Ubuntu18.04安装MySQL Server Ok, I solved in this way:
I used Software & Updates application to remove mariadb sources and executed the followings steps (ref https://askubuntu.com/a/934576): sudo apt purge mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 mysql-server sudo apt update && sudo apt dist-upgrade && sudo apt autoremove && sudo apt -f install sudo apt install mysql-server
终端连接MySQL mysql -h 192.168.19.1 -u root -p
安装MYSQL-python ip install configparser sudo cp /usr/lib/python3.6/configparser.py /usr/lib/python3.6/ConfigParser.py Then try to install the MYSQL-python again. That Worked for me