Skip to content

Instantly share code, notes, and snippets.

@ozzpy
Last active January 17, 2023 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozzpy/2540596c7e2aaabf487ce1b14922e44e to your computer and use it in GitHub Desktop.
Save ozzpy/2540596c7e2aaabf487ce1b14922e44e to your computer and use it in GitHub Desktop.
mysql-tiburcio
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