I have installed mysql-5.5.30-win32
. All works fine until i create my own my.ini
configuration file. When I am trying to start the service using CMD (I do run the cmd as administrator, and install the service before):
Error using mysqld --console
[Warning] Can't create test file C:\WebSerer\MySQL\data\x-PC.lower-test
[Warning] Can't create test file C:\WebSerer\MySQL\data\x-PC.lower-test mysqld: Can't change dir to 'C:\WebSerer\MySQL\data\' (Errcode: 2)
[ERROR] Aborting
[Note] mysqld: Shutdown complete
Error using NET START MySQL
The MySQL service is starting...
The MySQL service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
The configuration (my.ini) file
:
[mysql]
# CLIENT #
port = 3306
socket = C:\WebSerer\MySQL\data\mysql.sock
[mysqld]
# GENERAL #
user = mysql
default_storage_engine = InnoDB
socket = C:\WebSerer\MySQL\data\mysql.sock
pid_file = C:\WebSerer\MySQL\data\mysql.pid
# MyISAM #
key_buffer_size = 32M
myisam_recover = FORCE,BACKUP
# SAFETY #
max_allowed_packet = 16M
max_connect_errors = 1000000
skip_name_resolve
sql_mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
sysdate_is_now = 1
innodb = FORCE
innodb_strict_mode = 1
# DATA STORAGE #
datadir = C:\WebSerer\MySQL\data\
# BINARY LOGGING #
log_bin = C:\WebSerer\MySQL\data\mysql-bin
expire_logs_days = 14
sync_binlog = 1
# CACHES AND LIMITS #
tmp_table_size = 32M
max_heap_table_size = 32M
query_cache_type = 0
query_cache_size = 0
max_connections = 500
thread_cache_size = 50
open_files_limit = 65535
table_definition_cache = 1024
table_open_cache = 2048
# INNODB #
innodb_log_files_in_group = 2
innodb_log_file_size = 128M
innodb_flush_log_at_trx_commit = 1
innodb_file_per_table = 1
innodb_buffer_pool_size = 2G
# LOGGING #
log_error = C:\WebSerer\MySQL\data\mysql-error.log
log_queries_not_using_indexes = 1
slow_query_log = 1
slow_query_log_file = C:\WebSerer\MySQL\data\mysql-slow.log
I was looking the internet for solution for both of this errors. If anyone can help me please I will be very thankful, Thank you all and have a nice day.
Edit
This is the new Error using mysqld --console
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --ex
plicit_defaults_for_timestamp server option (see documentation for more details).
[Warning] Can't create test file C:\WebSerer\MySQL\data\iSession-PC.lower-t
est
[Warning] Can't create test file C:\WebSerer\MySQL\data\iSession-PC.lower-t
est
mysqld: Can't change dir to 'C:\WebSerer\MySQL\data\' (Errcode: 2 - No such file or directory)
[ERROR] Aborting
[Note] Binlog end
[Note] mysqld: Shutdown complete
Also i tryed to change the location of the data dir at the my.ini file, The new path for the datadir is located at my desktop, Now i have another different error i have seen previously when i remove the datadir line, This is the error:
**[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --ex
plicit_defaults_for_timestamp server option (see documentation for more details).**
**mysqld: File 'C:\WebSerer\MySQL\data\mysql-bin.index' not found (Errcode: 2 - No such file or directory)**
**[ERROR] Aborting**
**[Note] Binlog end**
**[Note] mysqld: Shutdown complete**
So as i understand, The first error was becouse of permission problems, There is mysql user inside the my.ini and i should change the mysql user permission so it can write, The second error is after i changed the location of the data folder to my desktop so it can write now, but now there is another error appear, If anyone can help me please with the permission to mysql user and the new error, and have a nice day.