我正在尝试使用Java备份和恢复MySQL DB。我可以通过命令恢复备份文件:
C:/Program Files/MySQL/MySQL Server 5.7/bin/mysql -u root --password=password myDbRestore是否有MySQL执行CREATEDATABASE IF NOT EXISTS的参数?换句话说,如何在一个语句/Java
因此,我尝试使用MySQL工作台在AWS RDS服务上连接到云中的数据库。 当我尝试连接时,我得到一个类似这样的错误。Access denied for user 'admin'@'ip_octet1-octet2-octet3-octet4.res.spectrum.com' to database 'default_database我已经能够从其他EC2实例外壳到MySQL实例中。 如有任何建议,我们将不胜感激。
但是,当我试图使用终端在mysql中创建一个新数据库时,我会得到以下错误:mysql> CREATEDATABASE;
ERROR 1064 (42000): You have an errorin your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
the mysqldatabase.This option should be used any time the dump contains the mysqldatabase and any other
database thatdepends on the data in the mysqldatabase for proper restoration.当它说它在转储数据库后发送刷新语句时,我读到这意味着数据、模式等被转储到备份文件