programming:mysql:mysql
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| programming:mysql:mysql [2017/10/04 12:34] – kroduit | programming:mysql:mysql [2019/10/11 09:34] (current) – [Export database] maferreira | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| Enter password: | Enter password: | ||
| - | | + | ===== Export database ===== |
| + | With data: | ||
| + | < | ||
| + | Without data: | ||
| + | <code mysql> | ||
| + | ===== Import | ||
| + | <code mysql> | ||
| + | <note important> | ||
| + | |||
| + | <code mysql> | ||
| Query OK, 1 row affected (0.01 sec) | Query OK, 1 row affected (0.01 sec) | ||
| + | |||
| + | ===== Create user ===== | ||
| + | <code mysql> | ||
| mysql> grant usage on *.* to myUsername@localhost identified by ' | mysql> grant usage on *.* to myUsername@localhost identified by ' | ||
| Line 84: | Line 96: | ||
| $ mysql_tzinfo_to_sql / | $ mysql_tzinfo_to_sql / | ||
| For more info see http:// | For more info see http:// | ||
| + | |||
| + | If this error, | ||
| + | <note warning> | ||
| + | |||
| + | <note tip>< | ||
| + | To keep variable always ON even if you restart the server, create file my.cnf | ||
| + | |||
| + | Read : | ||
| + | http:// | ||
| + | </ | ||
| <code mysql> | <code mysql> | ||
| Line 124: | Line 146: | ||
| bigint unsigned -- 8 bytes, approx. 9 quintillions elements (10E18)</ | bigint unsigned -- 8 bytes, approx. 9 quintillions elements (10E18)</ | ||
| - For timestamp:< | - For timestamp:< | ||
| - | bigint unsigned -- Overflow is on year 219'250'468 (easyControl in a Deathstar? | + | bigint unsigned -- Overflow is on year 292'277'026' |
| - Double VS smallint: \\ A double use 8 bytes, and a mediumint use 4 bytes.\\ If you exactly know the range and the precision of the stored value, the good question to ask is: what is better between an integer scaled value (4 bytes, but division implied) and double value (8 bytes). \\ \\ **Let' | - Double VS smallint: \\ A double use 8 bytes, and a mediumint use 4 bytes.\\ If you exactly know the range and the precision of the stored value, the good question to ask is: what is better between an integer scaled value (4 bytes, but division implied) and double value (8 bytes). \\ \\ **Let' | ||
| 600005 rows in set (2.13 sec) -- Average execution time (10 requests made), on my macMini</ | 600005 rows in set (2.13 sec) -- Average execution time (10 requests made), on my macMini</ | ||
programming/mysql/mysql.1507120482.txt.gz · Last modified: 2017/10/04 12:34 by kroduit