Setup MariaDB on Ubuntu server (remote access, user privileges, upload database)
p>This is most spread operation in Linux and I repeat it again and again in various circumstances.- Deploy ASP.NET Core application from scratch (install and tune SSH/VNC/FTP/NGINX/Daemon)
- Deploy data to dockerized MySQL and MariaDB
- Поднимаем на хостинге MySQL и PostgreSQL сервера.
Now I want to setup MariaDB, configure it to remote access, set up user privileges and upload database.
For check remote connection I will be use MySQL Workbench, unfortunately even installation it to Windows is a problem, because official distribution from Oracle don't working now https://dev.mysql.com/downloads/workbench/.
So, right link in this page other download.
Of course this way is not need if you want to connect to server only from Linux. In this case we need only:
# apt-get install mariadb-client # mysql -u admin -h xxx.xxx.xxx.xxx -p
And we go ahead to server.
- This is official page to installation https://mariadb.com/docs/deploy/community-single-server-cs105-ubuntu18/.
# wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup # echo "7a24f5580421fd353dc22c5439001bdaec86c54ed911c80e5482f62921125ac8 mariadb_repo_setup" | sha256sum -c - # chmod +x mariadb_repo_setup # sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.5" # sudo apt update # sudo apt install mariadb-server mariadb-backup
- Than need to start, this is my answer for server with remote access.
# sudo mysql_secure_installation
# sudo systemctl start mariadb # sudo systemctl stop mariadb # sudo systemctl restart mariadb # sudo systemctl enable mariadb # sudo systemctl disable mariadb # sudo systemctl status mariadb
# mysqld --help --verbose
# sudo mariadb # sudo mysql -u root -p > select host, user, password from mysql.user; > show databases; > exit
Alternative way to connect is:
# mysqladmin -u root -p version
# sudo nano /etc/mysql/my.cnf
And this is support remote access to server.
[mysqld] skip-networking=0 skip-bind-address
# sudo ufw allow 33306 # sudo ufw status numbered # netstat -ant
> create database cryptochest; > GRANT ALL ON *.* TO 'admin'@'%' IDENTIFIED BY 'xxxxxxxxxxxxx' WITH GRANT OPTION; > grant all privileges on cryptochest.* TO 'cryptochest'@'localhost' identified by 'yyyyyyyyyyyyyy'; > flush privileges;
> SET autocommit=0 ; source cryptochest-db-2020-11-30.sql ; COMMIT ;
Unfortunately I see an error.
> mysql_upgrade --verbose --verbose --force --user=admin
Save dump.
> sudo mysql -u root -p -h localhost > use cryptochestmax; > show tables; > mysqldump -u cryptochest -p ---port=33306 cryptochestmax Coin > cryptochestmax.Coin.$(date +%Y-%m-%d-%H.%M.%S).sql
Comments (
)
Link to this page:
//www.vb-net.com/MariaDbSetUp/Index.htm
<SITEMAP> <MVC> <ASP> <NET> <DATA> <KIOSK> <FLEX> <SQL> <NOTES> <LINUX> <MONO> <FREEWARE> <DOCS> <ENG> <CHAT ME> <ABOUT ME> < THANKS ME> |