Bug #80576 mysqlfrm does not work when launching mysql
Submitted: 1 Mar 2016 21:19 Modified: 4 Apr 2016 12:41
Reporter: Keith Bux Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Utilities Severity:S2 (Serious)
Version:1.5.6 OS:Windows
Assigned to: CPU Architecture:Any
Tags: mysqlfrm

[1 Mar 2016 21:19] Keith Bux
Description:
I seem to be experiencing the same issue with mysqlfrm that was identified with Bug #80020, though I am currently running mysqlfrm version 1.5.6 which should have fixed the bug.
When running in -vvv mode there seems to be a problem with the start up command for the new server.

How to repeat:
shell>msqlfrm --server=root:password@localhost --port=3307 -vvv "path to .frm file" > "path to store output"

Suggested fix:
Unknown
[4 Apr 2016 12:41] MySQL Verification Team
Hello Keith,

Thank you for the report.
I'm not seeing this issue with 1.5.6(on Linux), and with Dev release version on Windows( 1.6.1). Could you please share exact error details you are seeing at your end?

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Umesh
[4 Apr 2016 12:42] MySQL Verification Team
-- Windows

- create reqyuired schema

D:\ushastry\MySQL\mysql-5.7.11-winx64>bin\mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.11 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database test;
Query OK, 1 row affected (0.01 sec)

mysql> use test
Database changed
mysql> CREATE TABLE `test`.`order` (
    ->   `id` int(10) unsigned NOT NULL,
    ->   `value` varchar(100) DEFAULT NULL,
    ->   PRIMARY KEY (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.05 sec)

mysql>
- mysqlfrm
D:\ushastry\MySQL\mysql-5.7.11-winx64>mysqlfrm --basedir "D:\ushastry\MySQL\mysql-5.7.11-winx64" --port 3316 --user=root --verbose "D:\ushastry\MySQL\mysql-5.7.11-winx64\data\test\order.frm"
# Spawning server with --user=root.
# Starting the spawned server on port 3316 ... done.
# Reading .frm files
#
# Reading the order.frm file.
#
# CREATE statement for D:\ushastry\MySQL\mysql-5.7.11-winx64\data\test\order.frm:
#

CREATE TABLE `test`.`order` (
  `id` int(10) unsigned NOT NULL,
  `value` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

#...done.

D:\ushastry\MySQL\mysql-5.7.11-winx64>mysqlfrm --version
MySQL Utilities mysqlfrm version 1.6.1
License type: GPLv2

-- redirecting

D:\ushastry\MySQL\mysql-5.7.11-winx64>mysqlfrm --basedir "D:\ushastry\MySQL\mysql-5.7.11-winx64" --port 3316 --user=root --verbose "D:\ushastry\MySQL\mysql-5.7.11-winx64\data\test\order.frm" > order.sql
[4 Apr 2016 12:42] MySQL Verification Team
-- Linux

[root@cluster-repo ~]# mysql -uroot -p test
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.11 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE TABLE `test`.`order` (
    ->   `id` int(10) unsigned NOT NULL,
    ->   `value` varchar(100) DEFAULT NULL,
    ->   PRIMARY KEY (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.02 sec)

mysql> show variables like 'datadir';
+---------------+-----------------+
| Variable_name | Value           |
+---------------+-----------------+
| datadir       | /var/lib/mysql/ |
+---------------+-----------------+
1 row in set (0.00 sec)

mysql> \q
Bye
[root@cluster-repo ~]# mysqlfrm --basedir /usr --port 3316 --user=root --verbose /var/lib/mysql/test/order.frm
# Spawning server with --user=root.
# Starting the spawned server on port 3316 ... done.
# Reading .frm files
#
# Reading the order.frm file.
#
# CREATE statement for /var/lib/mysql/test/order.frm:
#

CREATE TABLE `test`.`order` (
  `id` int(10) unsigned NOT NULL,
  `value` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

#...done.

[root@cluster-repo ~]# mysqlfrm --basedir /usr --port 3316 --user=root --verbose /var/lib/mysql/test/order.frm > order.sql
[root@cluster-repo ~]# cat order.sql
# Spawning server with --user=root.
# Starting the spawned server on port 3316 ... done.
# Reading .frm files
#
# Reading the order.frm file.
#
# CREATE statement for /var/lib/mysql/test/order.frm:
#

CREATE TABLE `test`.`order` (
  `id` int(10) unsigned NOT NULL,
  `value` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

#...done.

[root@cluster-repo ~]# mysqlfrm --version
MySQL Utilities mysqlfrm version 1.5.6
License type: GPLv2
[root@cluster-repo ~]# rpm -qa|grep mysql-community-server
mysql-community-server-5.7.11-1.el6.x86_64
[root@cluster-repo ~]#