mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-27 08:58:13 +01:00 
			
		
		
		
	 f97c8f7ece
			
		
	
	
	f97c8f7ece
	
	
	
		
			
			It looks like C/C reconnect retains the database. It is correct behavior However there is a problem that mysql_install_db.exe does not create 'test' database, thus using mysql_install_db to create datadir, then restarting server and reconnecting does not succeed, if 'test' was current db before reconnect. The problem became apparent with MDEV-26715. Why it worked before, with a simpler 'root' definition is a mystery. Fix is to switch current connection to 'mysql' database, prior to reconnect to the instance created via mysql_install_db.exe
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			888 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			888 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| select database();
 | |
| database()
 | |
| test
 | |
| use mysql;
 | |
| Running bootstrap
 | |
| Creating my.ini file
 | |
| Removing default user
 | |
| Allowing remote access for user root
 | |
| Setting root password
 | |
| Creation of the database was successful
 | |
| # Kill the server
 | |
| # restart: --datadir=MYSQLTEST_VARDIR/tmp/ddir --loose-innodb
 | |
| connect  root,localhost,root,foo,mysql;
 | |
| SELECT @@datadir;
 | |
| @@datadir
 | |
| DATADIR/
 | |
| # Kill the server
 | |
| 1
 | |
| FOUND 1 /is not empty. Only new or empty existing directories are accepted for --datadir/ in install.log
 | |
| connection default;
 | |
| [mysqld]
 | |
| long_query_time=15.000000
 | |
| #slow_query_log_file=l:/errorlog/mariadb.slow.log
 | |
| slow_query_log_file=BASEDIR/data/slow_query_log_01.log
 | |
| datadir=BASEDIR/data
 | |
| server-id=1
 | |
| port=3307
 | |
| #tmpdir=C:/mysql_tmpdir
 | |
| tmpdir=BASEDIR/temp
 | |
| innodb_data_file_path=ibdata1:10M;ibdata2:10M:autoextend
 | |
| innodb_log_group_home_dir=BASEDIR/data
 | |
| skip-name-resolve
 | |
| [client]
 | |
| port=3307
 | |
| # restart
 | |
| use test;
 |