You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.
USE `bar`;
CREATE TABLE `Logs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_message` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`message` text COLLATE utf8_bin,
`read` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
);
I receive the error:
ERROR: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
When I use the tobi312/rpi-mysql image everything works as expected.
Inside the container when runnning:
$ cat /tmp/mysql-first-time.sql
I get:
DELETE FROM mysql.user ;
CREATE USER 'root'@'%' IDENTIFIED BY 'demopassword' ;
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;
DROP DATABASE IF EXISTS test ;
CREATE DATABASE IF NOT EXISTS `bar` ;
CREATE USER 'demouser'@'%' IDENTIFIED BY 'demopassword' ;
GRANT ALL ON `bar`.* TO 'demouser'@'%' ;
FLUSH PRIVILEGES ;
USE `bar`;
CREATE TABLE `Logs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`user_message` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`message` text COLLATE utf8_bin,
`read` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
);
Which seems to have no syntax error other than the space?
The text was updated successfully, but these errors were encountered:
Whenever
Inside
/db/schema
I have1.sql
:I receive the error:
When I use the
tobi312/rpi-mysql
image everything works as expected.Inside the container when runnning:
I get:
Which seems to have no syntax error other than the space?
The text was updated successfully, but these errors were encountered: