无法在 上创建临时文件/var/tmp
。
mysqldump: Error: 'Can't create/write to file '/var/tmp/mysql.k6NKGk/#sql_5dc_2.MAI' (Errcode: 2)' when trying to dump tablespaces
Run Code Online (Sandbox Code Playgroud)
在我的操作系统上。
id mysql
uid=60(mysql) gid=105(mysql) groups=105(mysql)
ls -l /var/
drwxrwxrwt 2 root root 72 oct 24 16:43 tmp
Run Code Online (Sandbox Code Playgroud)
我能做什么?
谁能告诉我怎么做?
(我知道这可能是一个愚蠢的问题,但我正在尝试学习如何使用 postgresql 的命令行)
~$ psql mybase
psql (9.1.3)
Type "help" for help.
Run Code Online (Sandbox Code Playgroud)
进而
mybase=# \dt
List of relations
Schema | Name | Type | Owner
--------+---------------------+-------+----------
public | xxxxxx | table | postgres
public | xxxxxxx | table | postgres
public | xxxxxxxxxxx | table | postgres
public | xxxxxxxx | table | postgres
public | xxxxxxxxx | table | postgres
public | xxxxxxxxx | table | postgres
public | xxxxxxxxxxxxxxxx | table | postgres
public | xxxxxxxxxxxx | …
Run Code Online (Sandbox Code Playgroud) GRANT ALL ON my-database.* TO my-user@10.0.0.1 IDENTIFIED BY 'password';
ERROR 1046 (3D000): No database selected
Run Code Online (Sandbox Code Playgroud)
好的,我创建了一个名称上带有“-”的数据库(对用户做了同样的事情)……然后当我尝试在其上设置授权时,数据库将无法工作。
如果我使用基础错误是不同的
MariaDB [(none)]> use my-base
Database changed
MariaDB [my-base]> GRANT ALL ON 'my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password';
ERROR 1064 (42000): 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 ''my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password'' at line 1
MariaDB [my-base]>
Run Code Online (Sandbox Code Playgroud)