heroku - Heroku 在 cleardb 数据库中提供的用户访问被拒绝
问题描述
使用 ClearDB 在 Heroku 中提供的凭据,他能够创建一个数据库:
engine = create_engine('mysql://user:password@host.cleardb.com/heroku_02c821a76ca04c8')
df.to_sql('attributs', engine,if_exists='append')
但是当我阅读信息时,似乎缺少权利。我试过了:
ubu@DESKTOP-QL4RO3V:/mnt/c/Windows/system32$ mysql -u user -p'password' -h host.cleardb.com -D heroku_02c821a76ca04c8
mysql: [Warning] Using a password on the command line interface can be insecure.
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 47008095
Server version: 5.6.50-log MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW TABLES;
+----------------------------------+
| Tables_in_heroku_02c821a76ca04c8 |
+----------------------------------+
| attributs |
+----------------------------------+
1 row in set (0.03 sec)
mysql> use attributs;
ERROR 1044 (42000): Access denied for user 'user'@'%' to database 'attributs'
所以我创建了第二个数据库来检查,似乎我可以创建数据库,但我无法获取它的信息;
mysql> create table test (username VARCHAR(255));
Query OK, 0 rows affected (0.05 sec)
mysql> use test;
ERROR 1044 (42000): Access denied for user 'bb9f0d500c90e4'@'%' to database 'test'
mysql> drop test;
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 'test' at line 1
mysql> drop table test;
如何读取数据库中的信息?我需要root吗?还是做一个新用户?但我还没有见过这样的事情。
解决方案
推荐阅读
- java - javax.naming.ServiceUnavailableException:套接字关闭
- dependency-injection - 如何在 Google Guice 中注入具有名称模式或正则表达式的属性列表?
- aws-sam-cli - SAM 构建仅使用 --use-container 参数成功完成
- .htaccess - .htaccess 重定向没有 WWW 到 HTTPS 不起作用
- smarty - 是否可以检查是否定义了(变量)修饰符(函数)?
- html - 垂直对齐似乎会影响兄弟元素的位置
- html - MySQL 到 InnerHtml Angular 7
- php - Onlinenic API v4
- r - 如何从 R 中的两个不同来源更新 numericInput?
- python - 为 IntelliJ IDEA 社区版安装 Python 3 插件