Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

mysql commands #8

Open
mwisner opened this issue Jan 6, 2015 · 1 comment
Open

mysql commands #8

mwisner opened this issue Jan 6, 2015 · 1 comment

Comments

@mwisner
Copy link
Contributor

mwisner commented Jan 6, 2015

Hello,

I can't seem to get any of the mysql related commands to work. Just curious if i'm doing something wrong?

For the mysql_create command I get:

Matts-MacBook-Pro:bin mwisner$ ./mysql_create test
=> Starting MySQL Server
=> Creating database test
Warning: Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
Warning: Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
Warning: Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
...

Just repeats over and over.

The mysql error log repeats:

2015-01-06 18:41:57 597 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-01-06 18:41:57 597 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-01-06 18:41:58 597 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-01-06 18:41:58 597 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-01-06 18:41:59 597 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2015-01-06 18:41:59 597 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-01-06 18:42:00 597 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
@paolomainardi
Copy link
Member

Hi @mwisner

The mysql_* commands are meant to be executed without the fig up -d command already running, that's why currently they needs to start a new mysql instance, they should be refactored to check if a running mysql instance already exists but it is quite hard because running a container means to create a new different container who cannot connect to the other one.

  1. https://github.com/twinbit/drocker-containers/blob/master/containers/mysql/scripts/create_db.sh
  2. https://github.com/twinbit/drocker-containers/blob/master/containers/mysql/scripts/import_sql.sh

You have 2 options right now:

  1. fig stop && bin/mysql_create [your-db] && fig up -d
  2. bin/mysql (to connect to a mysql instance and to manually create a db)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants