我安装了Debian Stretch和新安装的Mysql 8.0(配置还没有变化)。当我尝试使用以下内容创建新用户时:
mysql> CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'xyz';
Run Code Online (Sandbox Code Playgroud)
我得到以下信息:
错误 1726 (HY000):存储引擎“MyISAM”不支持系统表。[mysql.db]
关于问题可能是什么的任何建议?
谢谢
我正在尝试在 postgres 帐户下通过 psql 执行 SQK。我可以运行不包含引号的 SQL
root@server:/home/rosta/SCRIPTS# su postgres -c "psql -c 'SELECT NOW()'"
now
-------------------------------
2014-06-07 09:38:17.120368+02
(1 row)
Run Code Online (Sandbox Code Playgroud)
该问题出现在包含 SELECT 'hi' 等引号的 SQL 查询中。我正在使用简单的“hi”进行测试,但我想从 shell 脚本执行类似的操作。
su postgres -c "psql -c 'create database $DB_NAME template=template0 encoding='utf8' owner=aaa lc_collate='cs_CZ.utf8''"
Run Code Online (Sandbox Code Playgroud)
谁能告诉我如何在上面的命令中转义编码和整理的引号
我的一些测试:
root@server:/home/rosta/SCRIPTS# su postgres -c "psql -c 'SELECT \'hi\''"
bash: -c: line 0: unexpected EOF while looking for matching `''
bash: -c: line 1: syntax error: unexpected end of file
root@server:/home/rosta/SCRIPTS# su postgres -c "psql -c 'SELECT \\'hi\\''" …Run Code Online (Sandbox Code Playgroud)