Skip to content

MySQL snapshot didn't work. #10

Description

@epicserve

I've anonymized settings bellow.

Here is my stellar.yaml file.

project_name: 'my_db_name'
tracked_databases: ['my_db_name']
url: 'mysql+pymysql://my_db_username:******************@localhost/'
stellar_url: 'mysql+pymysql://my_db_username:******************@localhost/stellar_data'

Here is my command line session.

(my-project) ❯ stellar init
Please enter the url for your database.

For example:
PostreSQL: postgresql://localhost:5432/
MySQL: mysql+pymysql://root@localhost/: mysql+pymysql://my_db_username:******************@localhost/
You have the following databases: information_schema, my_db_name, test, test_my_db_name
Please enter the name of the database (eg. projectdb): my_db_name
Please enter your project name (used internally, eg. my_db_name) [my_db_name]:
Wrote stellar.yaml

Warning: MySQL support is still in beta.
Tip: You probably want to take a snapshot: stellar snapshot
(my-project)
brento@my-host ~/Sites/my-project-django (responses!)
(my-project-django) ❯ stellar snapshot
Traceback (most recent call last):
  File "/Users/brento/.virtualenvs/my-project/bin/stellar", line 9, in <module>
    load_entry_point('stellar==0.3.1', 'console_scripts', 'stellar')()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/stellar/command.py", line 225, in main
    stellar()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/click/core.py", line 572, in __call__
    return self.main(*args, **kwargs)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/click/core.py", line 552, in main
    rv = self.invoke(ctx)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/click/core.py", line 893, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/click/core.py", line 744, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/click/core.py", line 388, in invoke
    return callback(*args, **kwargs)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/stellar/command.py", line 42, in snapshot
    app = Stellar()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/stellar/app.py", line 43, in __init__
    self.init_database()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/stellar/app.py", line 61, in init_database
    tables_missing = self.create_stellar_database()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/stellar/app.py", line 70, in create_stellar_database
    self.operations.create_database('stellar_data')
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/stellar/operations.py", line 31, in create_database
    '%s%s' % (raw_conn.engine.url, database)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy_utils/functions/database.py", line 215, in create_database
    engine.execute(text)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1752, in execute
    return connection.execute(statement, *multiparams, **params)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 721, in execute
    return self._execute_text(object, multiparams, params)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 870, in _execute_text
    statement, parameters
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
    context)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1160, in _handle_dbapi_exception
    exc_info
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
    context)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
    cursor.execute(statement, parameters)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/cursors.py", line 132, in execute
    result = self._query(query)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/cursors.py", line 271, in _query
    conn.query(q)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/connections.py", line 726, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/connections.py", line 861, in _read_query_result
    result.read()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/connections.py", line 1064, in read
    first_packet = self.connection._read_packet()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/connections.py", line 826, in _read_packet
    packet.check_error()
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/connections.py", line 370, in check_error
    raise_mysql_exception(self._data)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/err.py", line 116, in raise_mysql_exception
    _check_mysql_exception(errinfo)
  File "/Users/brento/.virtualenvs/my-project/lib/python2.7/site-packages/pymysql/err.py", line 109, in _check_mysql_exception
    raise errorclass(errno,errorvalue)
sqlalchemy.exc.OperationalError: (OperationalError) (1044, u"Access denied for user 'my_db_username'@'localhost' to database 'stellar_data'") "CREATE DATABASE stellar_data CHARACTER SET = 'utf8'" ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions