[MSNoise] mysql on ubuntu
Thomas Lecocq
Thomas.Lecocq at seismology.be
Fri Feb 3 06:59:27 UTC 2017
Hi Ashton
Sorry to say this, but it's not an msnoise problem. So you should check
with your sysadmins or IT specialists. I don't know MariaDB default
configurations either, so I can't help.
Good luck & please let me know what the solution was at the end,
Thomas
On 03/02/2017 02:45, Flinders, Ashton wrote:
> ps;
>
> sudo mysqld --innodb_large_prefix=1 --innodb_file_format=barracuda
> --innodb_file_per_table=1 &
>
> doesnt seem to make a difference....
>
> On Thu, Feb 2, 2017 at 3:26 PM, Flinders, Ashton <aflinders at usgs.gov> wrote:
>
>> Follow-up;
>>
>> MariaDB [(none)]> SELECT User FROM mysql.user;
>> +---------+
>> | User |
>> +---------+
>> | msnoise |
>> | root |
>> +---------+
>>
>> MariaDB [(none)]> SHOW DATABASES;
>> +--------------------+
>> | Database |
>> +--------------------+
>> | information_schema |
>> | msnoise |
>> | mysql |
>> | performance_schema |
>> +--------------------+
>> 4 rows in set (0.01 sec)
>>
>>
>> so msnoise user exists (password is msnoise) and msnoise database exist....
>>
>> $sudo msnoise install
>> Launching the installer
>> Welcome to MSNoise
>>
>> What database technology do you want to use?
>> [1] sqlite
>> [2] mysql
>> Choice:2
>> Server: [127.0.0.1]:
>> Database: [msnoise]:
>> Username: [msnoise]:
>> Password: [msnoise]:
>>
>> fails with;
>> sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1071,
>> 'Specified key was too long; max key length is 767 bytes') [SQL: '\nCREATE
>> TABLE config (\n\tname VARCHAR(255) NOT NULL, \n\tvalue VARCHAR(255),
>> \n\tPRIMARY KEY (name)\n)\n\n']
>>
>>
>>
>> output.......
>>
>> Traceback (most recent call last):
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 1139, in _execute_context
>> context)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/default.py",
>> line 450, in do_execute
>> cursor.execute(statement, parameters)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/cursors.py", line
>> 166, in execute
>> result = self._query(query)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/cursors.py", line
>> 322, in _query
>> conn.query(q)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 835, in query
>> self._affected_rows = self._read_query_result(unbuffered=unbuffered)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 1019, in _read_query_result
>> result.read()
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 1302, in read
>> first_packet = self.connection._read_packet()
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 981, in _read_packet
>> packet.check_error()
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 393, in check_error
>> err.raise_mysql_exception(self._data)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/err.py", line 107,
>> in raise_mysql_exception
>> raise errorclass(errno, errval)
>> pymysql.err.InternalError: (1071, 'Specified key was too long; max key
>> length is 767 bytes')
>>
>> The above exception was the direct cause of the following exception:
>>
>> Traceback (most recent call last):
>> File "/usr/local/bin/msnoise", line 9, in <module>
>> load_entry_point('msnoise==1.4.1', 'console_scripts', 'msnoise')()
>> File "/usr/local/lib/python3.5/dist-packages/msnoise-1.4.1-
>> py3.5.egg/msnoise/scripts/msnoise.py", line 681, in run
>> cli(obj={})
>> File "/home/ashton/.local/lib/python3.5/site-packages/click/core.py",
>> line 716, in __call__
>> return self.main(*args, **kwargs)
>> File "/home/ashton/.local/lib/python3.5/site-packages/click/core.py",
>> line 696, in main
>> rv = self.invoke(ctx)
>> File "/home/ashton/.local/lib/python3.5/site-packages/click/core.py",
>> line 1060, in invoke
>> return _process_result(sub_ctx.command.invoke(sub_ctx))
>> File "/home/ashton/.local/lib/python3.5/site-packages/click/core.py",
>> line 889, in invoke
>> return ctx.invoke(self.callback, **ctx.params)
>> File "/home/ashton/.local/lib/python3.5/site-packages/click/core.py",
>> line 534, in invoke
>> return callback(*args, **kwargs)
>> File "/usr/local/lib/python3.5/dist-packages/msnoise-1.4.1-
>> py3.5.egg/msnoise/scripts/msnoise.py", line 221, in install
>> main()
>> File "/usr/local/lib/python3.5/dist-packages/msnoise-1.4.1-
>> py3.5.egg/msnoise/s000installer.py", line 90, in main
>> Base.metadata.create_all(engine)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/sql/schema.py",
>> line 3748, in create_all
>> tables=tables)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 1856, in _run_visitor
>> conn._run_visitor(visitorcallable, element, **kwargs)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 1481, in _run_visitor
>> **kwargs).traverse_single(element)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py",
>> line 121, in traverse_single
>> return meth(obj, **kw)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py",
>> line 730, in visit_metadata
>> _is_metadata_operation=True)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/sql/visitors.py",
>> line 121, in traverse_single
>> return meth(obj, **kw)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py",
>> line 764, in visit_table
>> include_foreign_key_constraints=include_foreign_key_constraints
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 914, in execute
>> return meth(self, multiparams, params)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py",
>> line 68, in _execute_on_connection
>> return connection._execute_ddl(self, multiparams, params)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 968, in _execute_ddl
>> compiled
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 1146, in _execute_context
>> context)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 1341, in _handle_dbapi_exception
>> exc_info
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/util/compat.py",
>> line 202, in raise_from_cause
>> reraise(type(exception), exception, tb=exc_tb, cause=cause)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/util/compat.py",
>> line 185, in reraise
>> raise value.with_traceback(tb)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/base.py",
>> line 1139, in _execute_context
>> context)
>> File "/home/ashton/.local/lib/python3.5/site-packages/sqlalchemy/engine/default.py",
>> line 450, in do_execute
>> cursor.execute(statement, parameters)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/cursors.py", line
>> 166, in execute
>> result = self._query(query)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/cursors.py", line
>> 322, in _query
>> conn.query(q)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 835, in query
>> self._affected_rows = self._read_query_result(unbuffered=unbuffered)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 1019, in _read_query_result
>> result.read()
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 1302, in read
>> first_packet = self.connection._read_packet()
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 981, in _read_packet
>> packet.check_error()
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>> line 393, in check_error
>> err.raise_mysql_exception(self._data)
>> File "/usr/local/lib/python3.5/dist-packages/pymysql/err.py", line 107,
>> in raise_mysql_exception
>> raise errorclass(errno, errval)
>> sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1071,
>> 'Specified key was too long; max key length is 767 bytes') [SQL: '\nCREATE
>> TABLE config (\n\tname VARCHAR(255) NOT NULL, \n\tvalue VARCHAR(255),
>> \n\tPRIMARY KEY (name)\n)\n\n']
>>
>>
>>
>>
>>
>>
>> On Thu, Feb 2, 2017 at 12:08 PM, Thomas Lecocq <
>> Thomas.Lecocq at seismology.be> wrote:
>>
>>> Hi,
>>>
>>> you should:
>>>
>>> 1/ make sure MySQL is installed (looks OK)
>>>
>>> 2/ create a priviliged user
>>>
>>> 3/ create a msnoise database (whatever the name)
>>>
>>> 4/ msnoise install -> provide the good details
>>>
>>>
>>> Thomas
>>>
>>> On 02/02/2017 20:51, Flinders, Ashton wrote:
>>>
>>>> Anyone running msnoise with mysql on Ubuntu? I have a working monitoring
>>>> setup using sqllite, but want to take advantage of multi threading, so
>>>> want
>>>> to move over mysql. Whenever I try and select mysql in msnoise install it
>>>> spits out;
>>>>
>>>> auth_packet = self._read_packet()
>>>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>>>> line 981, in _read_packet
>>>> packet.check_error()
>>>> File "/usr/local/lib/python3.5/dist-packages/pymysql/connections.py",
>>>> line 393, in check_error
>>>> err.raise_mysql_exception(self._data)
>>>> File "/usr/local/lib/python3.5/dist-packages/pymysql/err.py", line
>>>> 107,
>>>> in raise_mysql_exception
>>>> raise errorclass(errno, errval)
>>>> sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045,
>>>> "Access denied for user 'ashton'@'localhost' (using password: YES)")
>>>>
>>>> I've tried with sudo/root, etc. Suggestions?
>>>>
>>>> -ashton
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> MSNoise mailing list
>>> MSNoise at mailman-as.oma.be
>>> http://mailman-as.oma.be/mailman/listinfo/msnoise
>>>
>>>
>>
>> --
>> Ashton F. Flinders, Ph.D
>> U.S. Geological Survey
>> 345 Middlefield Road
>> Menlo Park, CA 94025
>> (650) 329-5050
>>
>>
>
More information about the MSNoise
mailing list