hadoop mysql install (5)
reference : http://dblab.xmu.edu.cn/blog/install-mysql/
http://wiki.ubuntu.org.cn/MySQL
#install mysql package:
hadoop@iZuf68496ttdogcxs22w6sZ:~$ sudo apt-get install mysql-server mysql-client
#start mysql service
root@iZuf68496ttdogcxs22w6sZ:/etc/mysql# service mysql start
#check service
root@iZuf68496ttdogcxs22w6sZ:/etc/mysql# pgrep mysql
4028
# init mysql root password
root@iZuf68496ttdogcxs22w6sZ:/etc/mysql# mysqladmin -u root -p password
Enter password:
New password:
Confirm new password:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
root@iZuf68496ttdogcxs22w6sZ:/etc/mysql# ls
conf.d debian.cnf debian-start my.cnf my.cnf.fallback mysql.cnf mysql.conf.d
root@iZuf68496ttdogcxs22w6sZ:/etc/mysql# grep pan232425 ./ -r -n
root@iZuf68496ttdogcxs22w6sZ:/etc/mysql# ls
conf.d debian.cnf debian-start my.cnf my.cnf.fallback mysql.cnf mysql.conf.d
#connect to mysql service
root@iZuf68496ttdogcxs22w6sZ:/etc/mysql# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.25-0ubuntu0.16.04.2 (Ubuntu)
Copyright (c) 2000, 2019, 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>