Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17504

ERROR: 1049 Unknown database 'mysql'

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.3.9
    • 10.3.11
    • Platform Windows
    • None
    • Windows 10

    Description

      I got different kind of error trying to install db.
      First I tried this command:
      mysql_install_db.exe --datadir=C:\...\mysql_data_dir -o
      Where I got ERROR: 1049 Unknown database 'mysql'
      And then
      2018-10-19 15:33:40 0 [ERROR] Aborting

      So following that jira to have more information:
      mysqld --datadir=C:\...\mysql_data_dir --skip-grant-tables --console

      So it seems I missed mysql database but it is not supposed to add it by itself?

      Attachments

        Activity

          JimiJones Jimi Jones created issue -
          JimiJones Jimi Jones made changes -
          Field Original Value New Value
          Description I got different kind of error trying to install db.
          First I tried this command:
          mysql_install_db.exe --datadir=C:\...\mysql_data_dir -o
          Where I got ERROR: 1049 Unknown database 'mysql'
          And then
          2018-10-19 15:33:40 0 [ERROR] Aborting

          So following that [jira|https://jira.mariadb.org/browse/MDEV-16596] I did:
          mysqld --datadir=C:\...\mysql_data_dir --skip-grant-tables --console

          And that seems working..
          I got different kind of error trying to install db.
          First I tried this command:
          mysql_install_db.exe --datadir=C:\...\mysql_data_dir -o
          Where I got ERROR: 1049 Unknown database 'mysql'
          And then
          2018-10-19 15:33:40 0 [ERROR] Aborting

          So following that [jira|https://jira.mariadb.org/browse/MDEV-16596] to have more information:
          mysqld --datadir=C:\...\mysql_data_dir --skip-grant-tables --console

          So it seems I missed mysql database but it is not supposed to add it by itself?
          wlad Vladislav Vaintroub added a comment - - edited

          mysql_install_db is supposed to create datadir, and mysql subdirectory inside it (i.e the database mysq), if those do not exist already. However as I checked, diagnostics in failure case are not very good (exactly, non-existent)

          You can check why it failed, with procmon, and if you succeed, you can send the procmon output file .
          My first guess would be permission problems

          wlad Vladislav Vaintroub added a comment - - edited mysql_install_db is supposed to create datadir, and mysql subdirectory inside it (i.e the database mysq), if those do not exist already. However as I checked, diagnostics in failure case are not very good (exactly, non-existent) You can check why it failed, with procmon, and if you succeed, you can send the procmon output file . My first guess would be permission problems
          wlad Vladislav Vaintroub made changes -
          Assignee Vladislav Vaintroub [ wlad ]

          Added extensive diagnostics for the case creation of directories fail.

          wlad Vladislav Vaintroub added a comment - Added extensive diagnostics for the case creation of directories fail.
          wlad Vladislav Vaintroub made changes -
          Fix Version/s 10.3.11 [ 23141 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 90190 ] MariaDB v4 [ 155084 ]

          People

            wlad Vladislav Vaintroub
            JimiJones Jimi Jones
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.