From 6a8a4601648d698f8285081bbde7d982fa45671f Mon Sep 17 00:00:00 2001 From: Aslak Raanes Date: Thu, 25 Oct 2018 13:52:19 +0200 Subject: [PATCH 1/3] begynn fjerning av yacc o.l. for lesing av mysql-admutils-config --- mysql-dbadm.c | 2 +- mysql-useradm.c | 2 +- pwfile.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-dbadm.c b/mysql-dbadm.c index d80ed86..ffe32a0 100644 --- a/mysql-dbadm.c +++ b/mysql-dbadm.c @@ -619,7 +619,7 @@ main(int argc, char *argv[]) if ((command != c_show) && (argc < 3)) return wrong_use(NULL); - read_config_file(); +/* read_config_file(); */ /* connect to the database server and select the mysql database */ if (!mysql_real_connect(&mysql, db_server, db_user, db_passwd, db_name, 0, NULL, 0)) diff --git a/mysql-useradm.c b/mysql-useradm.c index 04bcdca..f7d3e9a 100644 --- a/mysql-useradm.c +++ b/mysql-useradm.c @@ -277,7 +277,7 @@ main(int argc, char *argv[]) if ((command != c_show) && (argc < 3)) return wrong_use(NULL); - read_config_file(); +/* read_config_file(); */ /* connect to the database server and select the mysql database */ if (!mysql_real_connect(&mysql, db_server, db_user, db_passwd, db_name, 0, NULL, 0)) diff --git a/pwfile.c b/pwfile.c index ce2e573..433dd13 100644 --- a/pwfile.c +++ b/pwfile.c @@ -19,8 +19,8 @@ /* defaults for configurable values */ const char* db_user = "root"; -const char* db_server = "localhost"; -const char* db_passwd = NULL; +const char* db_server = "mysql.stud.ntnu.no"; +const char* db_passwd = MYSQLPW ; const char* db_name = "mysql"; extern int yyparse(void); From a99e1be6d8bf60a13911b27148eeba43ef26f343 Mon Sep 17 00:00:00 2001 From: Aslak Raanes Date: Thu, 25 Oct 2018 14:11:06 +0200 Subject: [PATCH 2/3] Riktig sti til mysql-lib er /usr/lib/x86_64-linux-gnu --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9b7bc2b..a1d090c 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ AC_ARG_WITH(mysql, if test "$withval" != "no"; then if test "$withval" = "yes"; then MYSQL_INCDIR=/usr/local/include/mysql - MYSQL_LIBDIR=/usr/local/lib/mysql + MYSQL_LIBDIR=/usr/lib/x86_64-linux-gnu else if test -f $withval/include/mysql/mysql.h; then MYSQL_INCDIR=$withval/include/mysql From d0c72fcc54e7e682a3f6e7c897737307e7fa4c6f Mon Sep 17 00:00:00 2001 From: Aslak Raanes Date: Thu, 25 Oct 2018 14:14:33 +0200 Subject: [PATCH 3/3] og riktig sti til mysql-include er /usr/include/mysql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit alt dette burde vært hentet vha. `mysql_config` --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a1d090c..10471f3 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ AC_ARG_WITH(mysql, [ if test "$withval" != "no"; then if test "$withval" = "yes"; then - MYSQL_INCDIR=/usr/local/include/mysql + MYSQL_INCDIR=/usr/include/mysql MYSQL_LIBDIR=/usr/lib/x86_64-linux-gnu else if test -f $withval/include/mysql/mysql.h; then