错误1049(42000):未知数据库'测试'

时间:2018-04-19 13:45:40

标签: mysql linux database centos innodb

我正在尝试在没有root访问权限的CentOS6.6 上安装mySQL服务器。 这是我的步骤。

  1. 在目录中解压缩 mysql-8.0.11 -linux-glibc2.12-i686(EX:[基本MySQL目录])

  2. 初始化并生成root密码: ./mysqld --initialize --user=mysql --lc_messages_dir=[Base MySQL Directory]/share --basedir=[Base MySQL Directory] --datadir=[BaseMySQL Directory]/data --log-error=[Base MySQL Directory]/data/mysql.err --pid-file=[Base MySQL Directory]/mysql.pid --socket=[Base MySQL Directory]/thesock --port=3306 &

  3. 启动服务器: ./mysqld --user=mysql --basedir=[Base MySQL Directory] --lc_messages_dir=[Base MySQL Directory]/share --datadir=[Base MySQL Directory]/data --log-error=[Base MySQL Directory]/data/mysql.err --pid-file=[Base MySQL Directory]/mysql.pid --socket=[Base MySQL Directory]/thesock --port=3306 &

  4. 访问MySQL数据库: ./mysql --socket=$MYSQL_TED_HOME/thesock --user=root --password="IL-Rp=Wj*3dg"

  5. 但是我收到了错误消息:

    mysql: [Warning] Using a password on the command line interface can be insecure.
    ERROR 1049 (42000): Unknown database 'test'
    

    我知道已经有很多问题像#34; ERROR 1049(42000):未知的数据库.... &#34 ;.但我无法发现它们中的任何一个与我的相似。

    这是" mysql.err":

    [Warning] Changed limits: max_open_files: 1024 (requested 5000)
    [Warning] Changed limits: table_open_cache: 431 (requested 2000)
    [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    [Warning] One can only use the --user switch if running as root
    
    [Warning] InnoDB: New log files created, LSN=45790
    [Warning] InnoDB: Creating foreign key constraint system tables.
    [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: ec2d7935-43d0-11e8-96ee-d89d6726c984.
    [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
    [Note] A temporary password is generated for root@localhost: IL-Rp=Wj*3dg
    [Warning] Changed limits: max_open_files: 1024 (requested 5000)
    [Warning] Changed limits: table_open_cache: 431 (requested 2000)
    [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
    [Note] ./mysqld (mysqld 5.7.13) starting as process 6390 ...
    [Warning] One can only use the --user switch if running as root
    
    [Note] InnoDB: PUNCH HOLE support not available
    [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    [Note] InnoDB: Uses event mutexes
    [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
    [Note] InnoDB: Compressed tables use zlib 1.2.3
    [Note] InnoDB: Using Linux native AIO
    [Note] InnoDB: Number of pools: 1
    [Note] InnoDB: Using CPU crc32 instructions
    [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    [Note] InnoDB: Completed initialization of buffer pool
    [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
    [Note] InnoDB: Highest supported file format is Barracuda.
    [Note] InnoDB: Creating shared tablespace for temporary tables
    [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    [Note] InnoDB: File './ibtmp1' size is now 12 MB.
    [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
    [Note] InnoDB: 32 non-redo rollback segment(s) are active.
    [Note] InnoDB: Waiting for purge to start
    [Note] InnoDB: 5.7.13 started; log sequence number 2524437
    [Note] InnoDB: Loading buffer pool(s) from [Base MySQL Directory]/mysql-5.7.13-linux-glibc2.5-x86_64/data/ib_buffer_pool
    [Note] Plugin 'FEDERATED' is disabled.
    [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
    [Note] Server hostname (bind-address): '*'; port: 3306
    [Note] IPv6 is available.
    [Note]   - '::' resolves to '::';
    [Note] Server socket created on IP: '::'.
    [Note] InnoDB: Buffer pool(s) load completed at 180419 20:55:57
    [Note] Event Scheduler: Loaded 0 events
    [Note] ./mysqld: ready for connections.
    Version: '5.7.13'  socket: '[Base MySQL Directory]/thesock'  port: 3306  MySQL Community Server (GPL)
    

0 个答案:

没有答案