Я не могу проверить свою базу данных с помощью mysql, и я немного новичок, и я не знаю, как это сделать, даже после прочтения связанных постов.
Я на Rails 4.1.5
идрагоценный камень адаптера gem 'mysql2', '~> 0.3.0'
.
mysql версия:
mysql --version
mysql Ver 14.14 Distrib 5.7.23,
и я хочу остановиться на этом, потому что сейчас слишком сложно изменить устаревшее приложение.
Это мой database.yml:
development:
adapter: mysql2
database: some_development
username: root
password:
host: localhost
port: 3306
Это работает:
mysql -u root -p some_development
Enter password:
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 47
Server version: 5.7.23 Homebrew
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
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_some_development |
+--------------------------------+
| activities |
| addresses |
| associated_products |
Но я все время делаю это от root.Пароль - это пароль, который я использую при входе на мой Mac.Это нормально?
Если я попробую это так:
mysql some_development
ERROR 1045 (28000): Access denied for user 'jwan'@'localhost' (using password: NO)
не получится.