MySQL installation on Kamailio - mysql

During installation of Kamailio SIP-server I run into the problem. After I Wrote /usr/local/sbin/kamdbctl create appears just ERROR: database engine not specified, please setup one in the config script. Know anyone possible reason?
Thank you very much

Change MYLIBDIR in kamdbctl to point to the path where the mysql file is available. That should allow it to find the right MySQL Engine.
One additional step i did prior was
apt-get install kamailio kamailio-mysql-modules

Defining the DBENGINE in /etc/kamailio/kamctlrc resolved an issue with the same "error message" on Debian 8 Jessie.
Hope that helps!
//Fredrik
"""
Kamctlrc
The /etc/kamailio/kamctlrc is the configuration file for kamctl and kamdbctl. You need to edit it and set the SIP_DOMAIN to your SIP service domain (or IP address if you don't have a DNS hostname associated with your SIP service).
Set also the DBENGINE to be MYSQL and adjust other setting as you want.
"""

I have done many changes in my /etc/kamailio/kamctlrc file to solve the problem but ERROR: database engine not specified, please setup one in the config script appears every time.
Then a simple thought that '#' is for comment solved the problem.
## database name (for ORACLE this is TNS name)
# DBNAME=MYSQL
Above was written in my /etc/kamailio/kamctlrc file and just removing the '#' created the database structure needed by Kamailio.
## database name (for ORACLE this is TNS name)
DBNAME=MYSQL
Just check that HASHTAG. ;)

Related

Deploy Mediawiki to Azure: no SSL Connection

I'm trying to deploy mediawiki to Azure Web App. I created the app using Linux and PHP 7.3. I unpacked WikiMedia 1.35.1 into wwwroot and used the browser to run the installation
I want to use MySQL for Azure as the database. So I enter the mysql.database.azure.com parameters and press install.
The error I get is
Cannot access the database: :real_connect(): (HY000/9002): SSL connection is required.
The docs say I need to set $wgDBssl to true in LocalSettings.php.
The problem is that LocalSettings.php does not exist yet. How do I specify an SSL connection during installation?
I am trying to figure out the same dilemma and hoping someone with more PHP knowledge can provide a better answer. As a work around, you can disable "Enforce SSL" on your MySQL database in Azure. Then you can run the setup, create the localSettings.php file. After which you can add the settings for $wgDBssl and re-enable enforce ssl setting.
To my knowledge, a connection to the database is being using the "/includes/installer/MysqlInstaller.php" when running the setup. In the "DatabaseMysqli.php" and "Database.php" of /includes/libs/rdbms/database/ directory these two files are used for connecting to the database when running any query.
I am trying to see if there is a way to set the SSL setting in these 3 files first then run the setup and application. Apologies that I've entered this as an answer also. I am new to StackOverflow and cannot create comments yet.
I was able to work around this issue by forcing the following clause in /includes/libs/rdbms/database/DatabaseMysqli.php to always be true by adding || true at the right place between the two closing parentheses:
if ( $this->getFlag( self::DBO_SSL ) || true ) {
$flags |= MYSQLI_CLIENT_SSL;
$mysqli->ssl_set(
$this->sslKeyPath,
$this->sslCertPath,
$this->sslCAFile,
$this->sslCAPath,
$this->sslCiphers
);
}
Maybe there's a more elegant way to make the original condition $this->getFlag( self::DBO_SSL ) to evaluate as true naturally?

How to configure Squirrel SQL client to work with MS Access

I'm struggling to get Squirrel SQL to connect to MS Access database (just a normal one, no password):
I create an Alias and use Driver: JBDC ODBC bridge (There is a tick in front of this driver)
I don't know what to put in URL
-------- I use: Path to database file ~~> Unsuccessful
-------- I use: jdbc:odbc:Path to database file ~~> Unsuccessful
I'm running it on windows 7.
I guest this should be a simple straight forward process, but please advise me how to get it working.
Now that the JDBC-ODBC Bridge has been removed from Java 8 the previous answer to this question will become less relevant over time. The following method uses the UCanAccess JDBC driver so it will work with Java 8 and it will also work on non-Windows platforms.
First, make sure that you are using UCanAccess version 3.0.5 or later. Download the latest version of the UCanAccess driver (bin.zip file) and unzip it to a convenient location. For this example I unzipped it to
/home/gord/Downloads/JDBC/UCanAccess
Note: When unzipping the distribution file be sure to specify "Keep directory structure" (or similar, depending on your unzip tool) so the folder structure appears as in the screenshot above.
Creating a Squirrel SQL "Driver" entry (one-time setup)
In Squirrel SQL, create a new "Driver" entry for UCanAccess
and specify the location of loader/ucanload.jar on the "Extra Class Path" pane
Note: Remember to enter net.ucanaccess.jdbc.UcanloadDriver as the "Class Name" (see above).
Creating a database "Alias" (one for each database)
To open a specific database, create a Squirrel SQL "Alias" entry, replacing the <path_to_database_file> placeholder with the actual path to the file
or, in Windows
Important: Make sure that the connection URL ends with ;showSchema=true.
I found the solution. Put below string in URL:
(Assuming that path to your database file is D:\DBs\DatabaseFile.mdb)
jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=D:\DBs\DatabaseFile.mdb

MySQL Workbench acquire access for administration?

I run MySQL 5.6 since month and everything went well. Also the MySQL Workbench 6.
I receive two errors if I would like to see the "Server Status".
1st error:
Could not acquire management access for admionistration
RuntimeError: Unable to execute comand chcp. Please make shure that
C:\Windows\System32 directory is in your PATH environment variable.
I checked the windows path variable within Win7 and there exist an entry c:\windows\system32
2nd error:
Unable exception: Current profile has no WMI enable
Any ideas?
To resolve the issue, simply click on Manage Server Instances under Server Administration column and close the screen again.
Now click on the instance again, check if the issue is fixed or report any bug.
I thought your MYSQl Service is not yet start.
Please Follow the below steps It works me like a charm.
windows + R - Type services.msc Press 'Enter' you could see many services . There is a service called MYSQl56 service if it's Disabled please Start that Service then once again restart the workbench.
For those who are still facing issue, add "C:\Windows\System32" in "path" Environmental Variable and make sure "MySQL56" service is running.
I follow those steps:
I started MySQL80 in Services.
Changed Server -> Management Access Settings -> System Profile, from Windows to Linux so then I entered into Server Status and refreshed.
I hope that can to help anybody.
If you got below error when click on Manage Import / Export option
Previously asked question Backup of mysql DB not being created is answered Exception: Current profile has no WMI enabled
I encountered this issue when trying to install my first mySQL server.
When configuring Remote Management, I overlooked the operating system setting for my server. I was using Windows but the default was set to FreeBSD. Once I changed the server OS setting to Windows, the problem went away.
I just encountered exactly the same problem - read lots of suggestions but solutions didn't work for me (I can't un-install MySQL and re-install it on a live server)...
...my resolution, and what worked for me, was to copy chcp.com from C:\Windows\System32\ to C:\Windows\SysWOW64\
I guess it's a path problem between a 32bit version of MySQL/Workbench and the 64bit OS
I got the same problem after restarting my pc and solved it by just starting wampserver!
so the solution is:
1. start wampserver- make sure apache,mysql are running and put all services online.
2.try to reconnect to the database!
Funnily enough, mine didn't work after the solution given by #mohit, and I'd rather not restart the computer as a work around as some has suggested.
After doing some digging around, I found that the mysql server service was not running
Task Manager --> Services --> [mysqlxx] right click and click start if not running. Note that. Note that [mysqlxx] could be a different format or name where xx are numbers

could not start the service MySQL.error 0

I am getting the following error when I try to configure MySQL instance, could any one help out to resolve this error.
I am using Windows XP SP2.
If you reinstall or upgrade MySQL without first stopping and removing the existing MySQL service and install MySQL using the MySQL Configuration Wizard, you may see this error:
Error: Cannot create Windows service for MySql. Error: 0
This occurs when the Configuration Wizard tries to install the service and finds an existing service with the same name.
One solution to this problem is to choose a service name other than mysql when using the configuration wizard. This enables the new service to be installed correctly, but leaves the outdated service in place. Although this is harmless, it is best to remove old services that are no longer in use.
To permanently remove the old mysql service, execute the following command as a user with administrative privileges, on the command-line:
shell> sc delete mysql
[SC] DeleteService SUCCESS
If the sc utility is not available for your version of Windows, download the delsrv utility from http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp and use the delsrv mysql syntax.
-- http://dev.mysql.com/doc/refman/5.0/en/windows-troubleshooting.html
Usually when the service doesn't manage to start, there will be more detailed information about what went wrong somewhere:
In mySQL's your_hostname_here.err file
In the system's error log (In english-language Windows, it's called event log I think)
you need to look there for the reason.

Unable to initialize provider. Missing or incorrect schema

I have upgraded my server machine to use MySQL Connector 6.3.4 and in our website we also added Membership role provider.
When I run the website I am getting this error.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unable to initialize provider. Missing or incorrect schema.
My sql server is version 5.0.90 community-net.
Is there any setting which have to be changes on server side while upgrading connector
This is tag in my web.config file.
Since when I run the website on local machine it will run successfully, but on server I am not able to run it and getting above error.
There is no mistake in connection string
What are server side setting which we to do while upgrading the connector....
thanks
I myself running into the same problem. I m using Mysql connector 6.3.0.0
So far I came across following suggestions when seaching on net:
1) Add "MySql.Data.dll" & "MySql.Web.dll" into your application "bin" folder.
2) Add reference to above to dlls in your application .
3) Add autogenerateschema="true" in your web.config file for required sections.
4) Check your Mysql connector version - make sure that the one that is in your bin folder is mentioned in your web.config file.
5) Check your connection string - make sure it is correct and connected successfully.
6) Check mysql membership related table structure.
7) Check schema version in "my_aspnet_schemaversion" table (e.g since you have upgraded to newer version I insist you should check this).
8) If the problem is on remote machine (e.g Production Server) you may wan to check this : http://www.reggieburnett.com/referencing-connectornet-on-a-remote-machine
I m sure you may gone through this list but I would like you to check schema version in "my_aspnet_schemaversion" table (e.g compare "version" field value of your local and remote table) since your upgrading to newer version.
BTW: I have checked this list for my problem but it did not help. I hope it may be of some help to you.
Edit:
Hi,
We are able to fix this error by following:
1) Deleted the tables for memberships in the db and had the mysql membership provider regenerate them
2) than set the Aministration.config file to trust the Mysql Membership Provider (e.g related to IIS admin)
Regards,
Gaurav
I had this same problem after checking all the things in Gaurav's post. It ended up being that the user account I was using in my connection string did not have necessary permissions to alter the db schema (I had autogenerateschema set to true). Once I changed my connection string to a user with more privileges (I used the 'root' user) then it updated the schema, and I changed the connection string back to the original user.
Always make sure that the Datasource is set to the real ip address and not localhost and check the passwords and usernames too. I am working with these clients and their ip address keeps changing and every time they do that, I get the same error
I know this is an old thread but maybe this will help someone. I was having this issue and realized that I was editing the wrong machine.config
At first I was editing on under C:\Windows\Microsoft.NET\Framework64....
Once I found the one for my .NET version under C:\Windows\Microsoft.NET\Framework.... and edited the correct spots, it worked fine following the instructions on MySQL's site.