Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8255407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:30:46+00:00 2026-06-08T01:30:46+00:00

I just downloaded MySQL 5.0.9 source code and build and installed as root user:

  • 0

I just downloaded MySQL 5.0.9 source code and build and installed as root user:

./configure
./make
./make install

Now I am trying to bring up mysqld but the error says:

[root libexec]# ./mysqld
120718  7:37:09 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

120718  7:37:09 [ERROR] Aborting

120718  7:37:09 [Note] ./mysqld: Shutdown complete

[root libexec]#

Note that I did all my activity as a root user and am trying to start the service for the very first time itself?

I did what user868766 stated below but was unable to successfully execute last command. However now I get something else while trying to invoke it directly:

BTW how do we set the MySQL root password?

[root libexec]# ./mysqld
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
120718  7:52:35  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
120718  7:52:35  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...
120718  7:52:35  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...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
120718  7:52:35  InnoDB: Started; log sequence number 0 0
120718  7:52:35 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

I just ran as per info present in the link provided by user868766:

[root bin]# mysql_install_db

Note using command other than that was giving issues:

[root bin]# mysql_install_db -user=mysql -ldata=/opt/mysql/mysql/data
Installing MySQL system tables...
120718  8:35:00 [Warning] Ignoring user change to 'ser=mysql' because the user was set to 'mysql' earlier on the command line

120718  8:35:00 [Warning] Ignoring user change to 'ser=mysql' because the user was set to 'mysql' earlier on the command line

/usr/local/libexec/mysqld: File 'data=/opt/mysql/mysql/data' not found (Errcode: 2)
120718  8:35:00 [ERROR] Could not use data=/opt/mysql/mysql/data for logging (error 2). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
OK
Filling help tables...
120718  8:35:00 [Warning] Ignoring user change to 'ser=mysql' because the user was set to 'mysql' earlier on the command line

120718  8:35:00 [Warning] Ignoring user change to 'ser=mysql' because the user was set to 'mysql' earlier on the command line

/usr/local/libexec/mysqld: File 'data=/opt/mysql/mysql/data' not found (Errcode: 2)
120718  8:35:00 [ERROR] Could not use data=/opt/mysql/mysql/data for logging (error 2). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
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 MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h idc-bldtool01 password 'new-password'

Alternatively you can run:
/usr/local/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 manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[root bin]# ls -l /opt/mysql/mysql/data
total 0

However after this I am able to bring mysqld up:

[root libexec]# ./mysqld
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
120718  8:37:22  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
120718  8:37:22  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
120718  8:37:23  InnoDB: Started; log sequence number 0 43655
120718  8:37:23 [Note] ./mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

Now I am trying to setup the root password as hinter in the above console dump:

[root~]# /usr/local/bin/mysql_secure_installation




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Enter current password for root (enter for none):
Aborting!

Cleaning up...

Please let me know how can I resolve the issue?

Thanks to user868766 I managed to resolve and able to bring up mysql and connect to it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:30:48+00:00Added an answer on June 8, 2026 at 1:30 am

    Please try this :

    1. cd /var/lib/mysql
    
    2. adduser mysql
    
    3. chown mysql:mysql -R /var/lib/mysql
    
    4. service mysqld restart
    

    Please execute the command in given order it should help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I recently downloaded MySQL 5.5.17, and I'm trying to build it from source
I just downloaded and installed MySQL on a windows machine. I will only be
I am trying to build MySQL's Connector/C from source in cygwin and there are
Just installed snow leopard and Xcode, i downloaded version 5.1.38 from the mysql website
Just downloaded the MySQL workbench for Windows and Just Installed XAMPP 1.7.7 but cannot
I'm trying to make a login script. I downloaded mysql, xampp, wamp. Already had
I just downloaded the WPF Reports v0.4 alpha When I build the project in
I've just downloaded MySQL Workbench. But I don't quite understand how to syn this
I've just downloaded hsqldb version 2.2.28 and I want to convert a mysql database
I tried for about 3-4 hours trying to get the mysql gem to install

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.