- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
I'm unable to view the databases inside Mysqlworkbench. Instead the following databases are listed : information_schema, hive, mysql, ranger, ranger_audit,test
- Labels:
-
Apache Sqoop
Created ‎01-31-2016 10:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whenever I execute the following query : sqoop list-databases --connect jdbc:mysql://localhost:3306 --username xxx -password xxx . Only the following tables are displayed information_schema, hive, mysql, ranger, ranger_audit,test, but not the databases which I created inside mysql workbench. Your guidance will be appreciated.
Created ‎02-01-2016 12:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@keerthana gajarajakumar I suggest to load the file from OS.
yum -y install git
git clone https://github.com/datacharmer/test_db.git
[root@sandbox ~]# cd test_db/
[root@sandbox test_db]# ls
Changelog employees.sql load_dept_emp.dump load_salaries1.dump load_titles.dump sakila test_employees_md5.sql
employees_partitioned_5.1.sql images load_dept_manager.dump load_salaries2.dump objects.sql show_elapsed.sql test_employees_sha.sql
employees_partitioned.sql load_departments.dump load_employees.dump load_salaries3.dump README.md sql_test.sh
[root@sandbox test_db]# mysql < employees.sql
Created ‎01-31-2016 11:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have created databases under hcatalog then you won't be able to see it through workbench
Created ‎01-31-2016 11:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎01-31-2016 11:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Neeraj Sabharwal. I downloaded the sample employee database from http://dev.mysql.com/doc/employee/en/employees-installation.html and ran the scripts on Mysql Workbench . I've got all the tables and data loaded but then when I executed the sqoop list-databases command the following is not being displayed. Am I missing anything?
Created ‎01-31-2016 11:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@keerthana gajarajakumar It looks like that your script creates a database employees
can you try this?
sqoop list-tables --connect jdbc:mysql://localhost:3306/employees --username xxx -password xxx
Created ‎01-31-2016 11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Neeraj Sabharwal -- Thanks Neeraj. I ran the code you suggested but I'm getting the following error - 16/01/31 23:58:50 ERROR manager.CatalogQueryManager: Failed to list tables com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'employees' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Created ‎02-01-2016 12:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created on ‎02-01-2016 12:04 AM - edited ‎08-19-2019 03:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Neeraj Sabharwal -- It's getting listed in mysql workbench but not when I try it on hortonworks sandbox
Created on ‎02-01-2016 12:08 AM - edited ‎08-19-2019 03:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Neeraj Sabharwal -- Thanks for your reply. When I try executing the following command.. I don't see employees listed below like yours.
Created ‎01-31-2016 11:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@keerthana gajarajakumar Try this
grant all privileges on *.* to ‘username’@’%’ identified by ‘userpassword’;
