w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to configure a Multi-Master Replication for MariaDB Galera Cluster in CentOS 6
See http://matthewcasperson.blogspot.com.au/2013/07/setting-up-galera-cluster-in-centos-6.html for some instructions. It runs through the process of setting up a MariaDB cluster in Centos.

Categories : Mysql

How to completely uninstall Android Studio?
Execute these commands from the terminal rm -Rf /Applications/Android Studio.app rm -Rf ~/Library/Preferences/AndroidStudio* rm ~/Library/Preferences/com.google.android.studio.plist rm -Rf ~/Library/Application Support/AndroidStudio* rm -Rf ~/Library/Logs/AndroidStudio* rm -Rf ~/Library/Caches/AndroidStudio* if you would like to delete all projects: rm -Rf ~/AndroidStudioProjects to remove gradle related files (caches & wrapper) rm -Rf ~/.gradle use the below command to delete all Android Virtual Devices(AVDs) and *.keystore. note: this folder is used by others Android IDE as well, so if you still using other IDE you may not want to delete this folder) rm -Rf ~/.android to delete Android SDK tools rm -Rf ~/Library/Android* edit: added remove all Android Studio's logs.

Categories : Osx

Installing MariaDB: unmet dependencies, mariadb-server-10.0
I solved the issue the following way: create new file in "/etc/apt/preferences.d/" named "mariadb": Package: * Pin: origin ftp.osuosl.org Pin-Priority: 1000 details: https://kb.askmonty.org/en/installing-mariadb-deb-files/#pinning-the-mariadb-repository This does Pin the MariaDB Repository and gives it a very high priority above 999 priority means it would even downgrade packages to install MariaDB. Reason: Oracle is issuing security update for MySQL and Ubuntu is distributing very up-to-date MySQL packages with higher version number than MariaDB. And MariaDB (it's a fork of MySQL) provides several binaries under the same name as MySQL. So pinning the MariaDB repository fixed the problem. Thank goes to Jbboin of the official IRC channel who pointed me in the right direction!

Categories : Ubuntu

MSI Uninstall Override logic fails, then I can’t uninstall
You have to edit the MSI in Orca to disable the custom action (InstallExecuteSequence table condition ) and recache it using the command msiexec /I foo.msi REINSTALLMOE=vomus REINSTALL=ALL /qb. Or you could just reply the snapshot on the VM to back out the install. I'm guessing you now understand that installers should be well tested before installing it on machines you actually care about.

Categories : Vb.Net

MariaDB, Django, and 127.0.0.1
localhost is special in the MariaDB/MySQL context. It selects the UNIX domain socket connection. 127.0.0.1 uses the TCP/IP connection. They are completely different. Your permissions need to explicitly state that, so in the above, in addition to 'putty'@'localhost' you need to include 'putty'@'127.0.0.1'. Note also that they are different users, and can have different permissions and different passwords - and they refer to different connection methods. In addition you need to ensure that MariaDB is listening on 127.0.0.1. This is often the default, however older migrated configs may still have skip-networking set in my.cnf. You will need to comment that out if it is set. Newer configuration will be bound to the local loopback: bind-address = 127.0.0.1 This should be enough to make

Categories : Mysql

Zend_Auth_Adapter_DbTable and MariaDb does not work?
this issue is based on mysql version. I migrated to mariadb and changed the credential to cast a char keeping the utf8 in my config file. -> setCredentialTreatment("CAST(MD5(CONCAT(MD5(?),salt)) AS CHAR) AND isactive='1'"); and works.

Categories : PHP

How do I start MariaDB on boot on Mac OS X?
You need to use launchd. See $ man launchd. Additionally, Nathan wrote a good article on launchd.

Categories : Osx

MariaDB replication does not work
After endless googling (with no result), we found by chance the problem was that port 4444 used by rsync replication was closed between the servers. After opening the port on firewall (accept everything from each other) everything works fine. The message was not very descriptive. So if you end up with: [Warning] WSREP: 0 (db3.example.com): State transfer to 1 (db4.example.com) failed: -1 (Operation not permitted) It could mean that your replication settings are good, but the connection itself is not working. EDIT It could also be a problem where the rsync daemon does not stop properly and is not detected by mariadb as running. It needs to be killed manually to free up the 4444 port.

Categories : Misc

MariaDB log_error variable
MariaDB uses a separate option called log-basename --log-basename=name (for example if name is mypc then mypc.err will be created as a error log) Basename for all log files and the .pid file. This sets all log file names at once (in 'datadir') and is normally the only option you need for specifying log files. This is especially recommend to be set if you are using replication as it ensures that your log file names are not depending on your host name. Sets names for --log-bin, --log-bin-index,--relay-log, --relay-log-index, --general-log-file, --log-slow-query-log-file, --log-error-file, and --pid-file.

Categories : Mysql

Different results in sqlfiddle.com 5.5.30 and MariaDB 5.5.31
Afraid I don't have MariaDB to hand, but could you try the following just to see how the user variables are output:- SELECT * FROM test_golf_player p LEFT JOIN ( SELECT pid, leaguepoints, @Sequence:=IF(@PrevPid = pid, @Sequence + 1, 0) AS aSequence, @PrevPid := pid FROM ( SELECT pid, leaguepoints FROM test_golf_card ORDER BY pid, leaguepoints DESC ) Sub1 CROSS JOIN (SELECT @PrevPid := 0, @Sequence := 0) Sub2 ) gC ON p.pid = gC.pid ORDER BY p.name DESC EDIT - Doing a bit of investigation looking at your results it seems that MariaDB has ignored the ORDER BY in the sub query. Hence the sequence number is in a random order, and also resets when the pid changes (which it does randomly due to the order not being fixed). Bit of a google and it

Categories : Mysql

errors during migration after moving to mariadb
The fixture holds multiple object mappings with a primary key of 0, see: https://github.com/rfkrocktk/django-locality/blob/master/src/locality/fixtures/initial_data.json#L18 Quick fix, replace the fixture with your own

Categories : Django

MariaDB on Linux | Access .sql database
I ran the following steps and connected successfully. Verify connect as root mysql -u root -p mysql> show databases; mysql> exit; Download the Northwind database Get it from here: http://code.google.com/p/northwindextended/downloads/detail?name=Northwind.MySQL5.sql Set up the Northwind database as root mysql -u root -p < Northwind.MySQL5.sql Add gianluca as a user and grant permission to northwind CREATE USER 'gianluca'@'localhost' IDENTIFIED BY 'whatevs'; GRANT ALL ON northwind.* TO 'gianluca'@'localhost'; FLUSH PRIVILEGES; exit; Connect as gianluca and access northwind tables mysql -u gianluca -p show databases; use northwind; show tables; Notice that once you have created a username on localhost you don't have to specify it when connecting.

Categories : Mysql

PHP (More SQL (MySQL/MariaDB)) - May I (the user) create a schema
show grants for 'username'@'host'; +--------------------------------------------------------------------------------------------------------------+ | Grants for openout@localhost | +----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'username'@'host' IDENTIFIED BY PASSWORD '*7041D3FA70F2EA166023420014A033ECA410EAB2' | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `adatabase`.* TO 'username'@'host' | +----------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) The problem is that it's a bit fussy about what's in the

Categories : PHP

Why is 'localhost' the default host used when trying to connect to MariaDB?
You must create properly user on system Fedora 19: [root@localhost ~]# useradd nusr [root@localhost ~]# passwd nusr Changing password for user fedora. New UNIX password:# set password Retype new UNIX password:# confirm passwd: all authentication tokens updated successfully. [root@localhost ~]# exit # logout So, a database didn't find user nusr and it will not to handle user nusr because isn't created on system wide. Hostname is from IP address named as "mydomain.com", but "host" can be IP address or name lookup host "mydomain.com".

Categories : Misc

How to validate login form using JavaScript PHP and MariaDb?
I am going to use jquery which is an excellent javascript framework. Since you have no code to show, I will only post for you pseudo code to show you how you can validate a username and password using jquery,php and mariadb. The mysqli API in php will work with mariadb HTMLClient side <html> <head> <script src="jquery-1.X"></script> <script> $(document).ready(function(e){ var username=$("#username").val(); var password=$("#password").val(); $("#login").click(function(){ if(username=="" && password=="") { alert("username or password is blank"); e.preventDefault();//prevent the form from submitting. } }) }) </script> </head> <body> <form name="loginForm" id="loginForm" method="post" action="login.php"> Username: <input t

Categories : PHP

Not able to execute Query in MariaDB using MySQL as Driver
You may want to take a look here : https://mariadb.atlassian.net/browse/MDEV-3935 the issue occurs when the password set on the mysql.user table uses an older format - of the form 7f84554057dd964b (which I believe is 'badpwd') rather than something like *AAB3E285149C0135D51A520E1940DD3263DC008C which is the newer form. Resetting the password for the user record(s) as noted in MDEV-545 does solve the issue as it upgrades the password format in the tables. From MariaDB documentation : https://mariadb.com/kb/en/pam-authentication-plugin/ Note: Windows does not use PAM, so the PAM authentication plugin does not work on Windows. However, one can use the Windows client to connect to a MariaDB server — on Linux or Solaris, for example — which does use the PAM authenti

Categories : Java

MariaDB jdbc connection fails during bulk inserts
https://dev.mysql.com/downloads/connector/j/ Have you tried just using the MySQL Connector/J? MySQL and MariaDB are binary compatible, and I've never run into any issues there. The MySQL Connector has the benefit of a significantly larger community.

Categories : Mysql

Do I have to uinstall MariaDB to give way to another open-source database?
They won't interact, it's like having Firefox and Chrome both installed at once. Also, MariaDB is a SQL-based database while MongoDB is a NoSQL database (so you're going to have to learn how Mongo handles input, etc).

Categories : Mongodb

Can I have a column capable of keeping all types in MySQL (MariaDB)?
MariaDB has the capability of storing columns per row. They can be of arbitrary types. Could it satisfy what you try to achieve? Check https://kb.askmonty.org/en/dynamic-columns/. I didn't use it personally.

Categories : Mysql

gwt-log Configurations
In this link, you have a most updated documentation about the GWT logging framework Answers to your questions: #1 Yes it works in client side, but only when running the app in DevMode (not in production nor superdev mode). Look for the log lines in the DevMode window, or in your terminal output if you run dev-mode from the command-line. #2 It depends on java.util.logging, you can change it though (see #3) #3 Yes you can change the logging framework extending the RemoteLoggingServiceImpl and overriding the logOnServer(LogRecord lr) method.

Categories : Java

node mariasql query won't terminate / does the mariadb.end() funciton wait for all the queries
Try calling db.end(); once you're done with writing into the database, as the driver keeps the connection open and hence prevents Node.js from shutting down. So your code should be db.query("INSERT INTO Persons (LastName, FirstName) VALUES ('Some', 'Name')") .on("result", function(result){ result.on("end", function(info){ console.log(info); console.log(result); db.end(); }); }); Alternatively, simply put the call to db.end(); into the very last line of your sample. According to the documentation, the driver only closes the connection once all queued commands have been run.

Categories : Javascript

How do i proceed to install mariadb as drop in replacement for mysql on a zend server 6 environnment?
No, there should be no more issues than when upgrading to a new MySQL version. See How can I upgrade from MySQL to MariaDB?

Categories : Mysql

MySQL, MariaDB: Cannot create a table - ERROR 1005 (HY000). Something wrong with foreign key
Your primary key is set to cou_id and course_name in your course table. To add a foreign key constraint in your students_marks table, you'd have to reference both fields (and include both fields in your table definition): CREATE TABLE IF NOT EXISTS course ( cou_id VARCHAR(3), course_name VARCHAR(25), CONSTRAINT pk_course PRIMARY KEY (cou_id, course_name) ); CREATE TABLE IF NOT EXISTS students_marks ( stu_id INT, student_name VARCHAR(25), cou_id VARCHAR(3), course_name VARCHAR(25), first_mark NUMERIC(2,0), second_mark NUMERIC(2,0), third_mark NUMERIC(2,0), CONSTRAINT pk_studentsmarks PRIMARY KEY (stu_id), CONSTRAINT fk_studentsmarks_course FOREIGN KEY (cou_id,course_name) REFERENCES course(cou_id,course_name) ); SQL Fiddle Demo

Categories : Mysql

PHPMailer, php.ini configurations
have a look at the googler results Tut at : http://www.askapache.com/php/phpfreaks-eric-rosebrocks-phpmailer-tutorial.html http://www.smtp2go.com/docs/php_mailer/ http://www.quackit.com/php/tutorial/php_mail_configuration.cfm [more here!] Shoot at : http://board.phpbuilder.com/showthread.php?10378410-PHP-mailer http://www.daniweb.com/web-development/php/threads/355029/php-mailer-problem Talk at : http://board.phpbuilder.com/showthread.php?10378410-PHP-mailer Sending an email using PHPMailer and GMAIL SMTP Thanks!

Categories : PHP

Issue with PHP configurations
Restart your apache web server. Linux: service restart apache Windows: Open Command prompt as Administrator: net stop apacheX.Y net start apacheX.Y Relace x.y with your version

Categories : PHP

iOS init configurations
You should put those configuration methods into the designated initializer method. More information about the designated initializers can be found here

Categories : IOS

How to build multiple configurations?
Your default configuration of C project is anycpu|debug but there isn't a propertygroup section for that config in what you've show or default values, therefore no Outputpath property exists. Fix that, either add some defaults or a new property group. Then make sure you've got the right configuration setup in Build->Configuration Manager in VS. Its hard to know what actual targets you want to build under what configuration in your sln but this sln works for me with standard csprojs (console): Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution

Categories : C#

With Ivy, how retrieve the configurations of dependencies?
You have to look into hibernate's ivy.xml to see the list of all published configurations. Either you resolve the dependency and take a look into your local cache, or you can view the ivy.xml directly in the repository you are using. Note: When you resolve from a maven repo there will be some translation/mapping from the POM to the ivy.xml.

Categories : Misc

How can I run an ANY CPU .NET executable programmatically in either 32-bit or 64-bit configurations?
According to Rick Byer's article, AnyCPU Exes are usually more trouble than they're worth, the decision on the "bitness" used to launch AnyCPU applications is determined by the OS loader and you don't have any say in the matter. Specifically: AnyCPU EXEs are a little more complicated since the OS loader needs to decide how to initialze the process. On 64-bit OSes they are run as 64-bit processes (unless the 'ldr64' master OS switch says otherwise), and on 32-bit OSes they are run as 32-bit processes. So, it looks like your best option is to create and launch a second, 32-bit exe and launch that.

Categories : C#

Django logging configurations
Django just used Python's logging framework. There are no entering/leaving methods in Python logging, as there is no need for them. For example, you could just do logger.debug('Entering') and logger.debug('Leaving') at the start/return from methods, and use %(funcName)s in the format string to indicate which method is being entered/exited. If you want to display contextual information (such as user id or email) in the logs, see this documentation. In Python logging you don't need to pass arrays of Object, as you can do something like logger.debug('processing [%s]: %s', i, list[i])

Categories : Django

Uninstall qt 4 from mac os
If I remember correctly, there is python script somewhere in /Developer/qt/tools.../uninstall-qt.py I'm not sure about the names, but you'll recognise the script. Also, you'll have to run it with sudo, smth like this: sudo python ./uninstall-qt.py I hope it helps.

Categories : Osx

Mulitple "Set StartUp Projects" Configurations
Take a look at the SwitchStartupProject extension. (I'm the author) Since version 2.0, it allows you to configure multiple multi-project startup configurations. You can switch between the configurations with a toolbar dropdown box: To configure two configurations (A, B, C) and (B, C, D): Install the extension (you might need to restart VS) A new Startup Project dropdown box appears to the right of the Start button. Click on it and choose Configure... Select single-project list mode None (to hide the single project items from the dropdown) Add two configurations and name them ABC and BCD Add multiple projects to each of the configurations Choose the order in which the projects will be started Note: Unlike the Visual Studio startup projects dialog, the extension does not allow you t

Categories : Visual Studio

Multiple SignalR hubs with different configurations
All hubs share the same connection object therefore they all share the same configuration. If you want to have 1 server but multiple connection configurations for hubs you can do the following: app.MapHubs(yourPathToConnectionWithConfigurationA, new HubConfiguration { Resolver = MyResolverWithConfigurationA }); app.MapHubs(yourPathToConnectionWithConfigurationB, new HubConfiguration { Resolver = MyResolverWithConfigurationB }); Therefore when you want to use configuration A you connect to that server end point and when you want to connect to endpoint B you connect to that endpoint. Keep in mind the hubs will not share clients/connections across the two configurations even though the hubs will be on both.

Categories : C#

Maven: Managing Spring configurations
I've solved the problem by using the approach of Spring profiles as suggested by @gerardribas. I've looked at the Jhipster implementation and follow that way. If somebody is following the same path, be aware that your need to upgrade your servlet version to 3.x.

Categories : Spring

Log4j multiple configurations within a single web-app
You need to define a different log4j appender for each of your service package. Here is how you can do this in log4j.xml: Appender1 <category name="com.test.project.Component1" additivity="true"> <priority value="DEBUG"/> <appender-ref ref="LOG1"/> </category> Appender2 <category name="com.test.project.Component2" additivity="true"> <priority value="TRACE"/> <appender-ref ref="LOG2"/> </category> You can use the same approach for properties file in case you are using properties file configuration for log4j.

Categories : Java

Play Framework 2.1.1: Run/debug configurations
Start play in debug mode in a separate command line console: $ play eclipse $ play debug run which should print... Listening for transport dt_socket at address: 9999 ... and start the app. Now you can attach a debugger in Eclipse (remote debug attached to port 9999). More details here Debug Playframework in Eclipse

Categories : Java

Where are the Eclipse CDT Debug Configurations stored?
Launch configurations are stored in your workspace .metadata folder as ".launch" files, in <workspace root>.metadata.pluginsorg.eclipse.debug.core.launches

Categories : C++

Checking for errors across all Build Configurations in VS 2010
Yes, go to menu Build > Batch Build and check every project/configuration you want built and click Build. You can assign a shortcut to command Build.BatchBuild (like Ctrl+Shift+Alt+B), and use two key combination to make it flash fast: Ctrl+Shift+Alt+B, Enter.

Categories : Visual Studio 2010

Defining different log4j2.xml configurations based on environment
What do you want to achieve with having multiple config files? I'll take a guess that you want to have separate log files for each web application. One way you can achieve this is using the RoutingAppender; this can delegate log events to other appenders depending on key/values set in the ThreadContextMap. Some people use their web app name as the value to switch on. Beta-9 (the last beta before GA) will be released soon and it will have better docs for using log4j2 with web apps (and the FAQ will have a detailed RoutingAppender example). Does this answer your question?

Categories : Misc

Hibernate schema generation: same configurations, different behaviour
Ok the tip from Hoàng Long to look at the logs led me to the answer: Apparently my database was just corrupt. Everything would work perfectly, except the 'ALTER TABLE' statements used to create the foreign key restraints, which would fail with an error. Apparently my postgresql installation was screwed up...

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.