MySQL on Linux October 10, 2022 08:26PM |
Registered: 5 years ago Posts: 34 |
Select * from Verkehrsarten
sudo service mysql stop
sudo rm -rf /var/lib/mysql
sudo mkdir /var/lib/mysql
sudo chown mysql:mysql /var/lib/mysql
sudo chmod 700 /var/lib/mysql
lower_case_table_names = 1
sudo mysqld --defaults-file=/etc/mysql/my.cnf --initialize --lower_case_table_names=1 --user=mysql --console
sudo service mysql start
sudo grep 'temporary password' /var/log/mysql/error.log
sudo mysql -u root -pand enter the temp password:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword;
SHOW VARIABLES LIKE 'lower_case_%'
SELECT @@GLOBAL.sql_mode
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
Argus
Re: MySQL on Linux October 11, 2022 05:35PM |
Re: MySQL on Linux October 12, 2022 10:56AM |
Registered: 6 years ago Posts: 250 |
Re: MySQL on Linux October 18, 2022 05:42PM |
Registered: 6 years ago Posts: 41 |
ccc2
Re: MySQL on Linux November 13, 2022 07:59AM |
Re: MySQL on Linux November 15, 2022 11:36AM |
Registered: 5 years ago Posts: 34 |
Re: MySQL on Linux November 18, 2022 11:59AM |
Registered: 6 years ago Posts: 155 |
sudo apt install mariadb-serverAfter installation is complete Secure MySQL/MariaDB
sudo mysql_secure_installationTo secure MySQL/MariaDB do the following
Enter current password for root (enter for none): (safely press Enter) Switch to unix_socket authentication [Y/n] (Press "Y") Change the root password? [Y/n] (Press "Y") New password: ("Enter new Password") Re-enter new password: ("Re-enter new Password") Remove anonymous users? [Y/n] (Press "Y") Disallow root login remotely? [Y/n] (Press "Y") //If Press "N" if You want to access the database from a remote server Remove test database and access to it? [Y/n] (Press "Y") Reload privilege tables now? [Y/n] (Press "Y")Edit Configuration
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnfOnce the file opens you need to locate the line where
collation-server = utf8mb4_general_cireplace this line with following
collation-server = utf8mb4_unicode_ciNow press Ctrl-S to Save and then Ctrl-X to exit.
sudo nano /etc/mysql/my.cnfMake sure your configuration has the below lines in the file.
[mysqld] character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci [mysql] default-character-set = utf8mb4Press Ctrl-S to Save and then Ctrl-X to exit.
sudo service mysql restart