MySQL - 14paxton/Linux GitHub Wiki
title: MySQL permalink: Linux/MySQL category: Linux parent: Linux layout: default has_children: false share: true shortRepo:
- linux
- default
Table of contents
{: .text-delta } 1. TOC {:toc}MYSQL mysql -u USERNAME -p
show databases;
SETTING TIMEZONES
o Get timezone = SELECT @@global.time_zone, @@session.time_zone;
o Get timestamp = SELECT CURRENT_TIMESTAMP(); o Set timestamp utc = SET @@session.time_zone='+00:00'; § You can set in my.cnf
o [mysqld]
**other variables**
default_time_zone='+00:00'
-GET PATHS
MySQL import
LOAD DATA LOCAL INFILE 'C:/Groovy/englishData.csv' INTO TABLE original_data
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES
sudo apt-get remove --purge mysql-* sudo apt-get autoremove sudo apt-get autoclean sudo apt-get dist-upgrade
sudo apt-get install mysql-server mysql-client (or maria if still having trouble). sudo apt-get install mariadb-server
-
If you have issues uninstalling/installing because MySQL process is live, you can try this first, then above: sudo kill $(pgrep mysql)
-
other trouble shooting
-
A very simple solution which I (the linux noob) had to dig up... is to create the file.
nano /etc/mysql/my.cnf.fallback and fill it with the default content from the mysql-common 5.7.11-0ubuntu6 package.
!includedir /etc/mysql/conf.d/
- https://www.apt-browse.org/browse/ubuntu/xenial/main/all/mysql-common/5.7.11-0ubuntu6/file/etc/mysql/my.cnf.fallback - https://askubuntu.com/questions/643251/having-trouble-installing-and-removing-mysql-in-ubuntu