Unable to change default data directory: form /var/lib/mysql to /mydata/db/mysql
SELINUX disbaled
Reboot done
Configured at mariadb-server.cnf and also other necessary configuration done.
[mysqld]
datadir = /mydata/db/mysql
socket = /mydata/db/mysql/mysql.sock
pid-file = /run/mariadb/mariadb.pid
But after restart data directory not changing. What are the possible reason for this issue?
Related
I'm trying to create SSL for Gitlab server by following the steps below:
1-Change rb file to indicate the external_url
/etc/gitlab/gitlab.rb
external_url 'https://10.1.43.111:443/gitlab'
2-Define the ssl cert in nginx - gitlab-http.conf
/var/opt/gitlab/nginx/conf#
However, when i run reconfigure command for gitlab --> sudo gitlab-ctl reconfigure, the content for gitlab-http.conf revert to the original file.
Did I define the SSL setting correctly? Any idea?
Thanks
One possible cause I get from the documentation "Configuration options for the GitLab Linux package / Specify the external URL at the time of installation"
As part of package updates, if you have EXTERNAL_URL variable set inadvertently, it replaces the existing value in /etc/gitlab/gitlab.rb without any warning.
Check the content of gitlab.rb after the reconfigure command: if it changes, that would explain why gitlab-http.conf is, in turn, affected.
I am trying to set up SELinux and an encrypted additional partition that I mount at startup using a systemd service.
If I run SELinux in permissive mode, everything runs ok (partition is correctly mounted, data can be accessed and service runs properly).
If I run SELinux in enforcing mode (enforcing=1), I am not able to mount such partition with the error:
/dev/mapper/temporary-cryptsetup-1808: chown failed: Permission denied
sh[1777]: Failed to open temporary keystore device.
sh[1777]: Command failed with code 5: Input/output error
Any ideas to fix that?
Audit2allow does not return any additional rules to be added
Solved assigning to cryptsetup the lvm_exec_t context.
In the lvm.fc file cryptsetup was defined as /bin/cryptsetup but I had to change it to /usr/sbin/cryptsetup where it actually was.
I upgraded the mysql5.1 to MariaDB5.5 on my CentOS6.8 SELinux server. The command service mysql start fails to start mysql service. If I use setenforce 0 then I can start mysql service and everything works, until a reboot.
getsebool reports: (I tested changing allow_user_mysql_connect to 'on')
allow_user_mysql_connect --> off
mysql_connect_any --> on
I searched and found a question stating to set permissions on the var/lib/mysql directory:
chcon -Rt mysqld_db_t mysql
chcon -Ru system_u mysql
The aboved did not solve the fail to start problem. What else do I need to configure in SELinux to have mysql service run with SELInux enabled?
Thanks
After reviewing my backups, the my.cnf file had set user=mysql. Once I added user=mysql to the new my.cnf file everything worked. The upgrade had created a new my.cnf file, as expected, which no longer had the setting user=mysql.
I am using MariaDB and below is my config file:
cat /etc/my.cnf.d/server.cnf
....
binlog_format=row
server_id=12
sync_binlog = 100
binlog-row-image = full
binlog_cache_size = 16M
binlog_stmt_cache_size = 16M
BUT tpm install has error message like below:
ERROR >> 127_0_0_1 >> The MySQL datasource binlog_format must be set to 'ROW'
for heterogenous replication. The MySQL configuration file does not include
binlog_format=row (RowBasedBinaryLoggingCheck)
ERROR >> 127_0_0_1 >> The MySQL config file '/etc/my.cnf.d/server.cnf' does
not include a value for server-id (MySQLApplierServerIDCheck)
Check the file to ensure a value is given and that it is not commented out
Please help!
I has sloved this problem by adding "--skip-validation-check=MySQLApplierServerIDCheck" option.
For mariaDB, tungsten-replicator looks in the main configuration file, not in the included ones.
How to reset password in MariaDB? I use Windows and NOT Linux. Anyone who knows how to reset my MySQL MariaDB password? I tried to search on Google but did not help.
I bumped into the same problem. I lost the root password for a test server on a windows development machine.
Following the Linux step:
After
net stop mysql
Try invoking mysqld with
mysqld --skip-grant-tables
mysqld will only exit with a short message
[Note] mysqld.exe <...5.5.48.MariaDB> starting as process <pid> ...
then it quits. However I tried to launch mysqld directly, there is no mysqld.exe process. The service start command might have some argument combination that enabled mysqld to run. Tried to pass the settings through a configuration file and it works.
put
skip-grant-tables=TRUE
into MariaDB 5.5\data\my.ini
Restart mysqld, by
net stop mysql && net start mysql
then being able to login as root.
Don't forget to remove the inserted line and restart mysqld again.
As this is top result in Google here's a quick way to change the password:
Stop the DB server
create a text file containing your new password:
ALTER USER 'root'#'localhost' IDENTIFIED BY 'DontForgetMeAgain';
Run this command (don't forget to replace the path to file):
mysqld --init-file=C:\\path\\to\\file.txt
And we're done
Using skip-grant-tables led Maria Db to complain when changing a password even if logged in as root.
I had to do a little modification on Tom's answer in the content of the file to make it work for me:
After stopping the DBServer i created a file with this content:
SET PASSWORD FOR 'root'#'localhost' = PASSWORD('mynewpassword');
FLUSH PRIVILEGES;
then I run:
C:\Program Files\MariaDB 10.1\bin>mysqld --init-file=C:\\path\\to\\file.txt
I then managed to log in