Last active
January 17, 2023 23:08
-
-
Save ozzpy/2540596c7e2aaabf487ce1b14922e44e to your computer and use it in GitHub Desktop.
mysql-tiburcio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install mysql-server -y | |
select * from mysql.user; | |
select host, user, password from mysql.user; | |
CREATE USER 'tiburcio'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; | |
ALTER USER 'tiburcio'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'tiburcio'; | |
GRANT ALL PRIVILEGES ON *.* TO 'tiburcio'@'localhost' WITH GRANT OPTION; | |
CREATE SCHEMA IF NOT EXISTS `sistema` DEFAULT CHARACTER SET utf8mb4 ; | |
flush privileges; | |
mysql -utiburcio -p < sistema.sql | |
mysql -utiburcio -p sistema < sistema.sql | |
sudo apt install mysql-server -y | |
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'pass'; | |
CREATE USER 'webmaster'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'webmaster'@'localhost' WITH GRANT OPTION; | |
CREATE USER 'webmaster'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'webmaster'@'localhost' WITH GRANT OPTION; | |
flush privileges; | |
mysql -uwebmaster -p < localhost.sql | |
mysql -uwebmaster -p database < database.sql | |
cat <(echo "SET FOREIGN_KEY_CHECKS=0;") imports.sql | mysql | |
cat <(echo "SET FOREIGN_KEY_CHECKS=0;") insert-sql_02-migration-to-03.sql | mysql -uwebmaster -p db_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment