'Command Not Found' during installation process

I am new to Linux and generally use Windows, but this service is only for Linux so perhaps someone help me figure out what I am doing wrong in this scenario.

I have followed the guide and instructions to installing the Percona XtraDB Cluster to the tee. However, I get hanged up when I get to Bootstrapping the first node. According to the documentation, it says to do this:

I input that information into my terminal and I just get: Command Not Found.

$ [root@pxc1 ~]# /etc/init.d/mysql bootstrap-pxc1
[root@pxc1: command not found

What am I doing wrong? I copied and pasted it so it can’t be a miss spelling. Googling the issue I didn’t come up with any results.

Hi Nightstorm;

What OS are you running? If you’re on CentOS 7 (or equivalent), you’ll need to use:

systemctl start mysql@bootstrap.service

I am running Ubuntu Xenial.

2018-02-09T14:07:45.740313Z 0 [Warning] WSREP: Fail to access the file (/var/lib/mysql//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown
2018-02-09T14:08:18.764621Z 0 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view (pc.wait_prim_timeout): 110 (Connection timed out)
2018-02-09T14:08:18.764640Z 0 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)
2018-02-09T14:08:18.764725Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1514: Failed to open channel 'pxc-cluster' at 'gcomm://192.168.70.61,192.168.70.62,192.168.70.63': -110 (Connection timed out)
2018-02-09T14:08:18.764740Z 0 [ERROR] WSREP: gcs connect failed: Connection timed out
2018-02-09T14:08:18.764749Z 0 [ERROR] WSREP: Provider/Node (gcomm://192.168.70.61,192.168.70.62,192.168.70.63) failed to establish connection with cluster (reason: 7)
2018-02-09T14:08:18.764755Z 0 [ERROR] Aborting

I fixed the command not found issue, but now i’m running into a new issue. MYSQL does not run when i attempt to bootstrap my first node, instead I get this error.

Here is my config file:

# Template my.cnf for PXC
# Edit to your requirements.
[mysqld]
server-id=1
datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
log-bin
log_slave_updates
expire_logs_days=7

wsrep_provider=/usr/lib/libgalera_smm.so
wsrep_cluster_name=pxc-cluster
wsrep_cluster_address=gcomm://***.***.108.42,***.**.188.117,***.**.177.229
wsrep_node_name=pxc
wsrep_node_address=***.***.108.42
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=sstuser:water
pxc_strict_mode=ENFORCING
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

wsrep_node_name=pxc2
wsrep_node_address=***.**.188.117

wsrep_node_name=pxc3
wsrep_node_address=***.**.177.229

Ip’s hidden for security reasons but are legit numbers.

Actually I am noticing that the IP’s in my error log are not the IP’s in my config file. I did put the old IP’s at first, following instructions carefully, but now I realized I needed to put the new IP’s. The config file is saved with correct permissions. I double checked my.cnf file and the new IP changes are there… but it seems to be attempting to constantly connect to old IP’s… why is this?

Edit: When I attempt to run the bootstrapping command I get this error:

The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

Nightstorm

What version of PXC are you running?

One way to check your config file settings is to use my_print_defaults, so for xenial you would run

my_print_defaults --defaults-file=/etc/mysql/my.cnf mysqld

This would let you verify that your settings aren’t being overwritten somewhere else in the config file.

I am using Percona 5.7

I found out the problem, which was I was installing all this on my local machine, RATHER than the server! So of course nothing worked as expected.

I now have followed the instructions (again), this time on my server. Everything ran smoothly until I got up to bootstrapping my first node. Here is the error log I got.

Bootstrapping first node

root@erc360-db-00:~# sudo /etc/init.d/mysql bootstrap-pxc
* Bootstrapping Percona XtraDB Cluster database server mysqld * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

mysql error report

● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-02-23 20:03:09 UTC; 11min ago
Docs: man:systemd-sysv-generator(8)
Process: 20264 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Main PID: 14144 (code=exited, status=0/SUCCESS)

mysql error log
Feb 23 20:03:08 erc360-db-00 systemd[1]: Starting LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon...
Feb 23 20:03:08 erc360-db-00 mysql[20264]: * Starting MySQL (Percona XtraDB Cluster) database server mysqld
Feb 23 20:03:08 erc360-db-00 /etc/init.d/mysql[20311]: MySQL PID not found, pid_file detected/guessed: /var/run/mysqld/mysqld.pid
Feb 23 20:03:09 erc360-db-00 mysql[20264]: * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
Feb 23 20:03:09 erc360-db-00 mysql[20264]: ...fail!
Feb 23 20:03:09 erc360-db-00 systemd[1]: mysql.service: Control process exited, code=exited status=1
Feb 23 20:03:09 erc360-db-00 systemd[1]: Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon.
Feb 23 20:03:09 erc360-db-00 systemd[1]: mysql.service: Unit entered failed state.
Feb 23 20:03:09 erc360-db-00 systemd[1]: mysql.service: Failed with result 'exit-code'.
2018-02-23T19:07:22.578324Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-02-23T19:07:22.975638Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-02-23T19:07:23.041804Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-02-23T19:07:23.114313Z 0 [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: c7509847-18cc-11e8-9b36-c29cd8$
2018-02-23T19:07:23.116069Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-02-23T19:07:23.116595Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2018-02-23T19:07:28.283299Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-02-23T19:07:28.283354Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2018-02-23T19:07:28.463750Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-02-23T19:07:28.466038Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.21-0ubuntu0.16.04.1) starting as process 14144 ...
2018-02-23T19:07:28.476453Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-02-23T19:07:28.476491Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-02-23T19:07:28.476495Z 0 [Note] InnoDB: Uses event mutexes
2018-02-23T19:07:28.476498Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-02-23T19:07:28.476504Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-02-23T19:07:28.476507Z 0 [Note] InnoDB: Using Linux native AIO
2018-02-23T19:07:28.476801Z 0 [Note] InnoDB: Number of pools: 1
2018-02-23T19:07:28.476933Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-02-23T19:07:28.478573Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-02-23T19:07:28.489911Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-02-23T19:07:28.492546Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-02-23T19:07:28.505144Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-02-23T19:07:28.523242Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-02-23T19:07:28.523338Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-02-23T19:07:28.558051Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-02-23T19:07:28.678414Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2018-02-23T19:07:28.678446Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2018-02-23T19:07:28.679273Z 0 [Note] InnoDB: Waiting for purge to start
2018-02-23T19:07:28.729508Z 0 [Note] InnoDB: 5.7.21 started; log sequence number 2551607
2018-02-23T19:07:28.729932Z 0 [Note] Plugin 'FEDERATED' is disabled.
2018-02-23T19:07:28.735653Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-02-23T19:07:28.737093Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180223 19:07:28
2018-02-23T19:07:28.737731Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2018-02-23T19:07:28.737750Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2018-02-23T19:07:28.737763Z 0 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2018-02-23T19:07:28.737800Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2018-02-23T19:07:28.749762Z 0 [Note] Event Scheduler: Loaded 0 events
2018-02-23T19:07:28.749927Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.21-0ubuntu0.16.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
2018-02-23T19:07:29.316098Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2018-02-23T19:07:29.331653Z 3 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2018-02-23T19:07:59.565896Z 4 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2018-02-23T19:22:42.877684Z 0 [Note] Giving 0 client threads a chance to die gracefully
2018-02-23T19:22:42.877714Z 0 [Note] Shutting down slave threads
2018-02-23T19:22:42.877721Z 0 [Note] Forcefully disconnecting 0 remaining clients
2018-02-23T19:22:42.877729Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2018-02-23T19:22:42.877816Z 0 [Note] Binlog end
2018-02-23T19:22:42.878313Z 0 [Note] Shutting down plugin 'ngram'
2018-02-23T19:22:42.878323Z 0 [Note] Shutting down plugin 'partition'
2018-02-23T19:22:42.878327Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2018-02-23T19:22:42.878330Z 0 [Note] Shutting down plugin 'ARCHIVE'
2018-02-23T19:22:42.878333Z 0 [Note] Shutting down plugin 'MyISAM'
2018-02-23T19:22:42.878337Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2018-02-23T19:22:42.878369Z 0 [Note] Shutting down plugin 'MEMORY'
2018-02-23T19:22:42.878376Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2018-02-23T19:22:42.878380Z 0 [Note] Shutting down plugin 'CSV'
2018-02-23T19:22:42.878385Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2018-02-23T19:22:42.878390Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2018-02-23T19:22:42.878394Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2018-02-23T19:22:42.878397Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2018-02-23T19:22:42.878402Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2018-02-23T19:22:42.878405Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2018-02-23T19:22:42.878409Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2018-02-23T19:22:42.878413Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2018-02-23T19:22:42.878417Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2018-02-23T19:22:42.878421Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2018-02-23T19:22:42.878425Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2018-02-23T19:22:42.878428Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2018-02-23T19:22:42.878430Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2018-02-23T19:22:42.878433Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2018-02-23T19:22:42.878435Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2018-02-23T19:22:42.878438Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2018-02-23T19:22:42.878484Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2018-02-23T19:22:42.878488Z 0 [Note] Shutting down plugin 'InnoDB'
2018-02-23T19:22:42.878536Z 0 [Note] InnoDB: FTS optimize thread exiting.
2018-02-23T19:22:42.878633Z 0 [Note] InnoDB: Starting shutdown...
2018-02-23T19:22:42.978905Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2018-02-23T19:22:42.979481Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 180223 19:22:42
2018-02-23T19:22:44.689557Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2551635
2018-02-23T19:22:44.692249Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-02-23T19:22:44.692284Z 0 [Note] Shutting down plugin 'sha256_password'
2018-02-23T19:22:44.692289Z 0 [Note] Shutting down plugin 'mysql_native_password'
2018-02-23T19:22:44.692501Z 0 [Note] Shutting down plugin 'binlog'
2018-02-23T19:22:44.692984Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

Edit: had to delete a few shutting down logs due to character size limit.

  1. Are you sure you are starting PXC. From the log it appears like you are starting MySQL server. PXC logs are way different with lot of additional information about the PXC wsrep plugin. Also, Percona product logs will tag SE as Percona XtraDB.
  2. PXC 5.7.21 is not yet released. Server that you are running is 5.7.21.