Apache Drill Embedded installed, but not able to run query on windows - apache-drill

I've installed the latest version of Apache drill (embedded mode) on my own desktop Windows 7, following the instructions on their website : //drill.apache.org/docs/drill-in-10-minutes/. Launched the command line and typed sqlline.bat -u "jdbc:drill:zk=local" and looked like I've had drill up and running. Below are the results of the command prompt.
c:\apache-drill\bin>sqlline.bat -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
HADOOP_HOME not detected...
HBASE_HOME not detected...
Calculating Drill classpath...
Oct 03, 2018 6:06:44 PM org.glassfish.jersey.server.ApplicationHandler
initialize
INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29
01:25:26...
apache drill 1.14.0
"got drill?"
0: jdbc:drill:zk=local>
But when I tried a simple query showing databases, it just returned dots. Tried some other simple queries like SELECT * FROM dfs.C:/drill/apache-drill-1.14.0/sample-data/region.parquet,also returned a line of dots.
c:\apache-drill\bin>sqlline.bat -u "jdbc:drill:zk=local"
DRILL_ARGS - " -u jdbc:drill:zk=local"
HADOOP_HOME not detected...
HBASE_HOME not detected...
Calculating Drill classpath...
Oct 03, 2018 6:06:44 PM org.glassfish.jersey.server.ApplicationHandler
initialize
INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29
01:25:26...
apache drill 1.14.0
"got drill?"
0: jdbc:drill:zk=local> show databases
. . . . . . . . . . . >
Also it didn't work when I tried to launch the web console. Can someone help me troubleshooting this? Many thanks!

Just specify semicolon in the end of line ;)
0: jdbc:drill:zk=local> show databases;
+---------------------+
| SCHEMA_NAME |
+---------------------+
| cp.default |
| dfs.default |
| dfs.root |
| dfs.tmp |
| information_schema |
| sys |
+---------------------+
6 rows selected (0.099 seconds)

Related

Could not link driver rlm_sql_mysql

I have a problem with MySQL:
freeradius -X gives the following command:
Could not link driver rlm_sql_mysql: /usr/lib/freeradius/rlm_sql_mysql.so: cannot open shared object file: No such file or directory
Make sure it (and all its dependent libraries!) are in the search path of your system's ld
/etc/freeradius/3.0/mods-enabled/sql[18]: Instantiation failed for module "sql
"
admin#ubuntu-de-01:/etc/freeradius/3.0/mods-available$ freeradius -v
radiusd: FreeRADIUS Version 3.0.16, for host x86_64-pc-linux-gnu, built on Apr 17 2019 at 12:59:55
FreeRADIUS Version 3.0.16
Copyright (C) 1999-2017 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT
The MySQL database is working:
Database changed
mysql> show tables;
+------------------+
| Tables_in_radius |
+------------------+
| nas |
| radacct |
| radcheck |
| radgroupcheck |
| radgroupreply |
| radpostauth |
| radreply |
| radusergroup |
+------------------+
8 rows in set (0.00 sec)
mysql>
I haven't tried installing libmysqlclient or yum or anything.
This problem started occurring after I've reinstalled the freeradius.
Is there a requirment to reinstall the mysql DB somehow as well?
Thank you
in my case, after downgrading the MySQL version, the libmysqlclient-dev library was missed, all that was needed was just to install it.
apt install libmysqlclient-dev
Hope, this helps someone.

Monitor Oracle DB with Zabbix

I install and configure Oracle instant client and unixODBC. When login with root, can connect to db by sqlplus or isql.
root#zabbix:~# sqlplus ***/***#***
SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 7 13:56:42 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Tue Mar 07 2017 13:19:45 +03:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
root#zabbix:~# isql ***
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
But in Zabbix admin panel I got error Cannot connect to ODBC DSN:[SQL_ERROR]:[08004][12154][[unixODBC][Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified]|.
I think this is trouble with no exists env for zabbix user, because sudo -u zabbix env output not contain ORACLE_HOME, TNS_ADMIN, NLS_LANG etc.
Where I can set it or what a problem?
I solved my problem.
Create file /etc/default/zabbix-server with necessary variables:
ORACLE_HOME=/usr/lib/oracle/12.1/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
NLS_LANG=AMERICAN_CIS.CL8MSWIN1251
TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin
Restart Zabbix server
Get main PID of Zabbix server process and check process env with strings -a /proc/18253/environ (replace 18253 with your PID):
LANG=en_US.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CONFFILE=/etc/zabbix/zabbix_server.conf
ORACLE_HOME=/usr/lib/oracle/12.1/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
NLS_LANG=AMERICAN_CIS.CL8MSWIN1251
TNS_ADMIN=/usr/lib/oracle/12.1/client64/network/admin

'information_schema.character_sets' doesn't exist

I have installed WAMP server2.2 . Installation completed smoothly. but when i tried to access phpmyadmin. It gives error. I changed the password from /wamp/apps/phpmyadmin3.5.1/conf.inc.php.
But now I am facing another error as follows:
Error:-
SQL query: Documentation Edit
SELECT * FROM information_schema.CHARACTER_SETS
MySQL said: Documentation
#1146 - Table 'information_schema.character_sets' doesn't exist
I am new to this so please help me out....I stuck on the same error......
I can't proceed further without phpmyadmin..... Hope somebody help me as early as possible to resolve this error.
Thanks in advance.
Login via command line,
mysql -h myhost -u myusername -p
<ENTER PASSWORD>
run the command
show databases;
sample output:
+--------------------+
| Database |
+--------------------+
| mysql |
| phprojekt |
| test |
+--------------------+
if there is no database information_schema in your output , your mysql server is too old. (Version 4.x, most recent is 5.6 as of 2013). This can be the case, if you try to connect to an old database server in your company which didn't bother to upgrade (happens quite often for many reasons).
Also read this:
Generate INFORMATION_SCHEMA table for MySQL database
(you can't)

Adding data sources for unixODBC/isql on Mac OSX Lion

I have installed unixODBC from source and mysql-odbc connector from .dmg installer on Mac OSX Lion. This was done a while ago, and at that time I successfully installed a data source (let's call it foo). Now I am trying to add another data source (DSN). I've done this through both ODBC Manager and the command-line tool myodbc-installer given with the tar bundle of the mysql-odbc connector from the mysql website. An entry shows up in /Library/ODBC/odbc.ini, which looks like this:
[ODBC Data Sources]
bar = MySQL ODBC 5.1 Driver
[ODBC]
Trace = 0
TraceAutoStop = 0
TraceFile =
TraceLibrary =
[myodbc]
Driver = /usr/local/lib/libmyodbc5.so
SERVER = localhost
PORT = 3306
[bar]
Driver = /usr/local/lib/libmyodbc5.so
Description =
DATABASE = bar
However, isql fails to find it:
anitya:Preferences neil$ isql bar bar bar -v
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
Weird thing is, the old DSN foo, which is not to be seen in /Library/ODBC/odbc.ini or /etc/odbc.ini, works fine:
anitya:Preferences neil$ isql foo foo foo
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
I'm miffed about where the DSN entries need to be entered on OSX Lion to be found by isql. Thanks in advance for your help!
Found it, odbc.ini was in /usr/local/etc

Unable to get multiple connection to MySql on Windows 7

I have installed MySql on windows 7 ... issue is i'm unable to get multiple connection to MySql .
If I connect to MySql through command line and at the same time open an other MySql command line client it goes into wait state, as soon as I disconnect the first one later one gets connected.
Because of above issues I'm unable to run tomcat in debug mode as it tries to get more than one connection to MySql in debug mode.
Previously I was using same version of MySql i.e. 5.1 on vista and it was working fine.
when connected with only one MySql Command line "show processlist" results
| 4 | root | localhost:49487 | NULL | Query | 0 | NULL | show processlist
1 row in set (0.00 sec)
and after connnecting with 2nd command line which hangs "show processlist" on the 1st window results
| 4 | root | localhost:49487 | NULL | Query | 0 | NULL | show processlist
| 5 | root | localhost:49518 | NULL | Sleep | 0 | NULL | NULL
2 rows in set (0.00 sec)
I entered following command through command line.
mysql -u root -h localhost -P 3306 -p
it asked me for password and got connected. Then I opened an other command prompt entered the same command it asked for password and hanged. I went back to the previous command line and closed it and the current one got connected. max_connection is 100 in my.ini file and show processlist reutns same result as above.
What is your 'max_connections' setting (show variables like '%max_connections%') and how many connections are currently 'live' on the server (show processlist)?
I'm guessing it's set very low (1 or 2) and between tomcat and your monitor connections you're exceeding the limit.
Raising it would be done via the mysql.ini/mysql.cnf file, wherever it's kept on Windows.
Are you connecting over the network? or a local file socket? You may be locking on the windows equivalent of mysql.sock - not sure if that behavior changed in Win7. Something like:
mysql -u root -h localhost -p 3306
and make sure that my.ini/my.cnf have networking enabled
After too many re installation of Windows I guess i have identified the root cause ... On every fresh installation MySql use to work fine but after a while I use to get stuck with this issue.
The cause was my voip messenger "Wizton" after installing it MySql work fine but when i restart my machine ... same Connection issue.
But wizton was working perfectly fine with Vista Business .. don't no what happens in Windows 7.