Look at the .frm
files. They are owned by root root
.
They are supposed to be owned by mysql mysql
My guess is that you copied the data rather than use MySQL techniques to import.
Perhaps you should change the ownership of the entire data folder.
Please run the following commands:
cd /var/www/xampp/mysql/data
chown -R mysql:mysql *
Then restart mysql.
As for the error messages, the InnoDB System Tablespace (ibdata1) and the Redo Log Files (ib_logfile0,ib_logfile1) are being created.
From the above messages, my guess is that you did this something like this
- You had shutdown mysql
- You copied
/var/lib/mysql
to /var/www/xampp/mysql/data
- You started mysql
- mysqld did not see InnoDB Infrastructure files, so they were created
If you have an all-MyISAM database (every table uses the InnoDB storage engine) you can easily get away with copying data folders. You would still have to change file ownership to mysql mysql
. If there are any InnoDB tables, you must copy the entire data folder, not just a database within the data folder.
CAVEAT
Please note that running SHOW TABLES;
simply walks across the current database telling you table names by looking at the .frm
files without checking ownership or table validity. Once you actually perform some SQL again the table that all metadata checks against the table are done.
Group Replication vs Galera (aka PXC)
Group Replication is only months old; Galera has been around for years. Once GR establishes its worth (which I think it will), the answer may be something like this...
They are very similar. Both do an excellent job of HA -- any single node crashing can be recovered from, usually automatically. Both provide a high degree of read scaling. GR promises to provide more write scaling.
Without knowing your requirements, and your tolerance for various things, I cannot advise on which way to go. Perhaps 90% of MySQL/MariaDB/Percona users on this forum do not use any form of Replication. So, the first question is, do you need any Replication solution?
The architectures are different, but the goals are similar. That is, "there is more than one way to skin a cat".
Fault tolerance, in my opinion, is achievable only if you are willing to put nodes in at least 3 separate geographic locations (think flood/tornado/earthquake/etc). Both allow for that. I use the rule of surviving any single-point-of-failure, and include "datacenter" as a point-of-failure.
GR is a significant improvement over Oracle's previous offering, Fabric.
Since you did not mention Sharding, I did not mention it.
MySQL Cluster
The term "MySQL Cluster" is confusing; technically it refers to "NDB Cluster", which is significantly different than "Group Replication" aka "InnoDB Cluster".
NDB is discussed briefly by Ibrahim, but I would not go so far as to say "best solution ever".
NDB was originally a telco application for very reliable handling of telephone switching. MySQL, Oracle, and SeveralNines have enhanced it _to be somewhat closer to a general RDBMS. It retains its high reliability.
I would limit the use of NDB to applications that need the specific features that it provides.
Advice
For someone starting in the database world with MySQL, I would go with a non-replicated InnoDB-based dataset. When replication / HA / scaling are needed, consider Group Replication or Galera. Move to NDB only if it fits your application better.
Best Answer
Fixed it by adding "group_replication_local_address" value in my.cnf cluster config file.