mysql
Ez a dokumentum egy előző változata!
Install (CentOS)
yum install mysql-server mysql php-mysql
How to configure MySQL
1. Set the MySQL service to start on boot
chkconfig --levels 235 mysqld on
2. Start the MySQL service
service mysqld start
3. Log into MySQL
mysql -u root
4. Set the root user password for all local domains
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('new-password');
5. Drop the Any user
DROP USER ''@'localhost'; DROP USER ''@'localhost.localdomain';
6. Exit MySQL
exit
Engine
InnoDB corruption repair guide — Szabó Dávid 2016/09/01 15:54
Tranzakciók
start transaction ... commit
SELECT * FROM ... WHERE <primary_key> = ... FOR UPDATE; // sor szinten lockol // akkor is, ha még nem létező kulcsra adjuk ki!
LOAD DATA
GYORS adatbetöltés. (pl 300.000 sor 1.8 sec volt)
LOAD DATA
INFILE '/var/lib/mysql-files/valami.csv'
INTO TABLE egy_tabla
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
Előfordulhat, hogy máshonnan nem fogadja el a fájl a mysql:
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
Ekkor:
SHOW VARIABLES LIKE "secure_file_priv";
és másold oda a fájlt.
mysql.1513607884.txt.gz · Utolsó módosítás: 2018/10/03 13:31 (külső szerkesztés)
