[MDEV-4095] issues while creating db Created: 2013-01-26  Updated: 2013-01-26  Due: 2013-02-26  Resolved: 2013-01-26

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Mani Sundarigari Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

I wanted to install mariadb on RHEL Server release 5.8 (Tikanga).

$ uname -a
Linux vlmmk644 2.6.18-308.8.1.0.1.el5 #1 SMP Tue May 29 20:48:54 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux



 Description   

$ ./scripts/mysql_install_db
Installing MariaDB/MySQL system tables in './data' ...
130126  5:16:47 InnoDB: The InnoDB memory heap is disabled
130126  5:16:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130126  5:16:47 InnoDB: Compressed tables use zlib 1.2.3
130126  5:16:47 InnoDB: Using Linux native AIO
130126  5:16:47 InnoDB: CPU supports crc32 instructions
130126  5:16:47 InnoDB: Error: Linux Native AIO is not supported on tmpdir.
InnoDB: You can either move tmpdir to a file system that supports native AIO
InnoDB: or you can set innodb_use_native_aio to FALSE to avoid this message.
130126  5:16:47 InnoDB: Error: Linux Native AIO check on tmpdir returned error[22]
130126  5:16:47 InnoDB: Warning: Linux Native AIO disabled.
130126  5:16:47 InnoDB: Initializing buffer pool, size = 128.0M
130126  5:16:47 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
130126  5:16:47 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
130126  5:16:47 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
130126  5:16:47 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
130126  5:16:48 InnoDB: Doublewrite buffer not found: creating new
130126  5:16:48 InnoDB: Doublewrite buffer created
130126  5:16:48 InnoDB: 128 rollback segment(s) are active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
130126  5:16:48 InnoDB: 1.2.0 started; log sequence number 0
130126  5:16:48 [ERROR] ./bin/mysqld: unknown variable 'name=MariaDB'
130126  5:16:48 [ERROR] Aborting
 
130126  5:16:48 InnoDB: FTS optimize thread exiting.
130126  5:16:48 InnoDB: Starting shutdown...
130126  5:16:49 InnoDB: Shutdown completed; log sequence number 1595685
130126  5:16:49 [Note] ./bin/mysqld: Shutdown complete
 
 
Installation of system tables failed!  Examine the logs in
./data for more information.
 
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
 
    shell> /scripts/mysql_install_db --defaults-file=~/.my.cnf
 
You can also try to start the mysqld daemon with:
 
    shell> ./bin/mysqld --skip-grant --general-log &
 
and use the command line tool ./bin/mysql
to connect to the mysql database and look at the grant tables:
 
    shell> ./bin/mysql -u root mysql
    mysql> show tables
 
Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in ./data that may be helpful.
 
The latest information about mysql_install_db is available at
http://kb.askmonty.org/v/installing-system-tables-mysql_install_db.
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
 
Please check all of the above before mailing us!  And remember, if
you do mail us, you should use the ./bin/mysqlbug script!



 Comments   
Comment by Elena Stepanova [ 2013-01-26 ]

Hi,

Please attach your my.cnf file or paste its contents here.

If you didn't create my.cnf file, and you think there shouldn't be any at all, run the install script with --no-defaults option:

./scripts/mysql_install_db --no-defaults

Comment by Sergei Golubchik [ 2013-01-26 ]

The error message is very clear:

130126 5:16:48 [ERROR] ./bin/mysqld: unknown variable 'name=MariaDB'

our config files do not have this setting, this probably comes from one of your my.cnf files that you have on your system. 'name' is not a valid configuration variable, it wouldn't work either in MySQL or in MariaDB.

Comment by Mani Sundarigari [ 2013-01-26 ]

may i know what should i do now?

Comment by Mani Sundarigari [ 2013-01-26 ]

$ ./scripts/mysql_install_db --no-defaults
Installing MariaDB/MySQL system tables in './data' ...
130126 5:51:59 InnoDB: The InnoDB memory heap is disabled
130126 5:51:59 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130126 5:51:59 InnoDB: Compressed tables use zlib 1.2.3
130126 5:51:59 InnoDB: Using Linux native AIO
130126 5:51:59 InnoDB: CPU supports crc32 instructions
130126 5:51:59 InnoDB: Error: Linux Native AIO is not supported on tmpdir.
InnoDB: You can either move tmpdir to a file system that supports native AIO
InnoDB: or you can set innodb_use_native_aio to FALSE to avoid this message.
130126 5:51:59 InnoDB: Error: Linux Native AIO check on tmpdir returned error[22]
130126 5:51:59 InnoDB: Warning: Linux Native AIO disabled.
130126 5:51:59 InnoDB: Initializing buffer pool, size = 128.0M
130126 5:51:59 InnoDB: Completed initialization of buffer pool
130126 5:51:59 InnoDB: highest supported file format is Barracuda.
130126 5:51:59 InnoDB: 128 rollback segment(s) are active.
130126 5:51:59 InnoDB: 1.2.0 started; log sequence number 1595685
130126 5:52:00 InnoDB: FTS optimize thread exiting.
130126 5:52:00 InnoDB: Starting shutdown...
130126 5:52:01 InnoDB: Shutdown completed; log sequence number 1602834
OK
Filling help tables...
130126 5:52:01 InnoDB: The InnoDB memory heap is disabled
130126 5:52:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130126 5:52:01 InnoDB: Compressed tables use zlib 1.2.3
130126 5:52:01 InnoDB: Using Linux native AIO
130126 5:52:01 InnoDB: CPU supports crc32 instructions
130126 5:52:01 InnoDB: Error: Linux Native AIO is not supported on tmpdir.
InnoDB: You can either move tmpdir to a file system that supports native AIO
InnoDB: or you can set innodb_use_native_aio to FALSE to avoid this message.
130126 5:52:01 InnoDB: Error: Linux Native AIO check on tmpdir returned error[22]
130126 5:52:01 InnoDB: Warning: Linux Native AIO disabled.
130126 5:52:01 InnoDB: Initializing buffer pool, size = 128.0M
130126 5:52:01 InnoDB: Completed initialization of buffer pool
130126 5:52:01 InnoDB: highest supported file format is Barracuda.
130126 5:52:01 InnoDB: 128 rollback segment(s) are active.
130126 5:52:01 InnoDB: 1.2.0 started; log sequence number 1602834
130126 5:52:01 InnoDB: FTS optimize thread exiting.
130126 5:52:01 InnoDB: Starting shutdown...
130126 5:52:02 InnoDB: Shutdown completed; log sequence number 1602844
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'./bin/mysqladmin' -u root password 'new-password'
'./bin/mysqladmin' -u root -h vlmmk644 password 'new-password'

Alternatively you can run:
'./bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://kb.askmonty.org or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '.' ; ./bin/mysqld_safe --datadir='./data'

You can test the MariaDB daemon with mysql-test-run.pl
cd './mysql-test' ; perl mysql-test-run.pl

Please report any problems with the './bin/mysqlbug' script!

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from
Monty Program Ab. You can contact us about this at sales@montyprogram.com.
Alternatively consider joining our community based development effort:
http://kb.askmonty.org/en/contributing-to-the-mariadb-project/

Comment by Elena Stepanova [ 2013-01-26 ]

So, It worked just fine. As Sergei said above, you need to locate your my.cnf file containing the invalid 'name' option and remove it. Until you do that, you can run the server the same way

./bin/mysqld_safe --no-defaults

Comment by Mani Sundarigari [ 2013-01-26 ]

$ ./bin/mysqld_safe --no-defaults
130126 06:02:18 mysqld_safe Logging to '/fisc/dba/mani/mysql/data/vlmmk644.err'.
130126 06:02:18 mysqld_safe Starting mysqld daemon with databases from /fisc/dba/mani/mysql/data
rm: cannot remove `/tmp/mysql.sock': Operation not permitted
130126 06:02:19 mysqld_safe mysqld from pid file /fisc/dba/mani/mysql/data/vlmmk644.pid ended

Comment by Elena Stepanova [ 2013-01-26 ]

Hi Mani,

Please try to read the messages that the software produces instead of just pasting them, they do make sense most of the time. This one says there is /tmp/mysql.sock which the server needs, but you don't have permissions for.

If you need guidance on setting correct permissions on files, please read Linux documentation.

For basic information on how to start MariaDB server, please read https://kb.askmonty.org/en/starting-and-stopping-mariadb/ (you probably need all sections).

Comment by Elena Stepanova [ 2013-01-26 ]

Forgot to mention: please keep in mind that if you already have /tmp/mysql.sock, there is a chance that you also have a running MySQL/MariaDB server on the machine. If that's the case, you'll need to provide a unique port and socket value for the server you are trying to start, to avoid conflicts. Yo will find how to do that in the KB section by the link above.

Comment by Mani Sundarigari [ 2013-01-26 ]

Thank You.

Looks like it went through now.

$ ./bin/mysqld_safe --no-defaults
130126 07:38:18 mysqld_safe Logging to '/fisc/dba/mani/mysql/data/vlmmk644.err'.
130126 07:38:18 mysqld_safe Starting mysqld daemon with databases from /fisc/dba/mani/mysql/data
130126 07:38:19 mysqld_safe mysqld from pid file /fisc/dba/mani/mysql/data/vlmmk644.pid ended

Comment by Mani Sundarigari [ 2013-01-26 ]

can you please assist me here.

i have run this command ./scripts/mysql_install_db

and now i want to start mysqld and list databases

Generated at Thu Feb 08 06:53:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.