Pencarian

Rss Posts

 

 

 

Berita pada kategori ‘Sindikasi’

Hendy Irawan: Activating the EMF Edit ItemProvider AdapterFactory-s (with CDO)

Dec 30, 2010

I used to have a problem with CDO Editor UI: it does not use my EMF Edit models’ ItemProvider implementation (like label formatting, image/icon, and so on).

Today I found the reason, I changed the model’s nsURI and did not change all references to it.

The relevant portion is plugin.xml for your.model.edit plugin :

?? <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
????? <factory
??????????? uri="
http://www.abispulsa.com/model/1.0"
??????????? class="com.abispulsa.provider.AbispulsaItemProviderAdapterFactory"
??????????? supportedTypes=
????????????? "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
?????????????? org.eclipse.emf.edit.provider.IStructuredItemContentProvider
?????????????? org.eclipse.emf.edit.provider.ITreeItemContentProvider
?????????????? org.eclipse.emf.edit.provider.IItemLabelProvider
?????????????? org.eclipse.emf.edit.provider.IItemPropertySource"/>
?? </extension>

The way to get ComposedAdapterFactory I previously blogged turned out to be incorrect:

public class AbispulsaContentProvider extends AdapterFactoryContentProvider {

private static AdapterFactory adapterFactory;

static {
adapterFactory = new ComposedAdapterFactory(new AdapterFactory[] {
new ResourceItemProviderAdapterFactory(),
new AbispulsaItemProviderAdapterFactory(),
new ReflectiveItemProviderAdapterFactory()
});
}

public AbispulsaContentProvider() {
super(adapterFactory);
}

}

The correct way is like this:

public class AbispulsaContentProvider extends AdapterFactoryContentProvider {

private static ComposedAdapterFactory adapterFactory;

static {
Registry registry = EMFEditPlugin.getComposedAdapterFactoryDescriptorRegistry();
adapterFactory = new ComposedAdapterFactory(registry);
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}

public AbispulsaContentProvider() {
super(adapterFactory);
}

}

Although then you should move the ComposedAdapterFactory creation to another singleton class so it can be reused from both ContentProvider and LabelProvider.

Note that for above to work, the extension org.eclipse.emf.edit.itemProviderAdapterFactories must also be set properly.

This is actually not CDO specific, but applies to all EMF Edit / Editor UI in general.
But it highlights a very important CDO feature: it reuses your EMF Edit ItemProvider implementations! :-)

Hendy Irawan: How to Dump/Inspect Object or Variable in Java

Dec 26, 2010

Scala (console) has a very useful feature to inspect or dump variables / object values :

scala> def b = Map("name" -> "Yudha", "age" -> 27)
b: scala.collection.immutable.Map[java.lang.String,Any]

scala> b
res1: scala.collection.immutable.Map[java.lang.String,Any] = Map((name,Yudha), (age,27))

Inside our application, especially in Java programming language (although the techniques below obviously works with any JVM language like Scala and Groovy) sometimes we want to inspect/dump the content of an object/value. Probably for debugging or logging purposes.

My two favorite techniques is just to serialize the Java object to JSON and/or XML. An added benefit is that it’s possible to deserialize the dumped object representation back to an actual object if you want.

JSON Serialization with Jackson

Depend on Jackson (using Maven):
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.6.3</version>
</dependency>
Then use it:
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

..
Logger logger = LoggerFactory.getLogger(getClass());

@Test
public void level() throws ServiceException, JsonGenerationException, JsonMappingException, IOException {
MagentoServiceLocator locator = new MagentoServiceLocator();
Mage_Api_Model_Server_HandlerPortType port = locator.getMage_Api_Model_Server_HandlerPort();
String sessionId = port.login("...", "...");
logger.info(String.format("Session ID = %s", sessionId));
Map[] categories = (Map[]) port.call(sessionId, "catalog_category.level", new Object[] { null, null, 2 } );
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
logger.info( mapper.writeValueAsString(categories) );
}

Example output :

6883 [main] INFO id.co.bippo.shop.magentoclient.AppTest - [ {
? "position" : "1",
? "level" : "2",
? "is_active" : "1",
? "name" : "Gamis",
? "category_id" : "3",
? "parent_id" : 2
}, {
? "position" : "2",
? "level" : "2",
? "is_active" : "1",
? "name" : "Celana",
? "category_id" : "5",
? "parent_id" : 2
} ]

XML Serialization with XStream

As a pre-note, XStream can also handle JSON with either Jettison or its own JSON driver, however people usually prefer Jackson than XStream for JSON serialization.

Maven dependency for XStream:
<dependency>
<groupId>xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.2.2</version>
</dependency>
Use it:
import java.io.IOException;
import java.rmi.RemoteException;
import java.util.Map;

import javax.xml.rpc.ServiceException;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.thoughtworks.xstream.XStream;
...
@Test
public void infoXml() throws ServiceException, RemoteException {
MagentoServiceLocator locator = new MagentoServiceLocator();
Mage_Api_Model_Server_HandlerPortType port = locator.getMage_Api_Model_Server_HandlerPort();
String sessionId = port.login("...", "...");
logger.info(String.format("Session ID = %s", sessionId));
Map category = (Map) port.call(sessionId, "catalog_category.info",
new Object[] { 3 } );
XStream xstream = new XStream();
logger.info( xstream.toXML(category) );
}

Sample output:

5949 [main] INFO id.co.bippo.shop.magentoclient.AppTest - <map>
? <entry>
??? <string>position</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>custom_design</string>
??? <string></string>
? </entry>
? <entry>
??? <string>custom_use_parent_settings</string>
??? <string>0</string>
? </entry>
? <entry>
??? <string>custom_layout_update</string>
??? <string></string>
? </entry>
? <entry>
??? <string>include_in_menu</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>custom_apply_to_products</string>
??? <string>0</string>
? </entry>
? <entry>
??? <string>meta_keywords</string>
??? <string>gamis, busana muslim</string>
? </entry>
? <entry>
??? <string>available_sort_by</string>
??? <string></string>
? </entry>
? <entry>
??? <string>url_path</string>
??? <string>gamis.html</string>
? </entry>
? <entry>
??? <string>children</string>
??? <string></string>
? </entry>
? <entry>
??? <string>landing_page</string>
??? <null/>
? </entry>
? <entry>
??? <string>display_mode</string>
??? <string>PRODUCTS</string>
? </entry>
? <entry>
??? <string>level</string>
??? <string>2</string>
? </entry>
? <entry>
??? <string>description</string>
??? <string>Gamis untuk muslimah</string>
? </entry>
? <entry>
??? <string>name</string>
??? <string>Gamis</string>
? </entry>
? <entry>
??? <string>path</string>
??? <string>1/2/3</string>
? </entry>
? <entry>
??? <string>created_at</string>
??? <string>2010-12-24 11:37:41</string>
? </entry>
? <entry>
??? <string>children_count</string>
??? <string>0</string>
? </entry>
? <entry>
??? <string>is_anchor</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>url_key</string>
??? <string>gamis</string>
? </entry>
? <entry>
??? <string>parent_id</string>
??? <int>2</int>
? </entry>
? <entry>
??? <string>filter_price_range</string>
??? <null/>
? </entry>
? <entry>
??? <string>all_children</string>
??? <string>3</string>
? </entry>
? <entry>
??? <string>is_active</string>
??? <string>1</string>
? </entry>
? <entry>
??? <string>page_layout</string>
??? <string></string>
? </entry>
? <entry>
??? <string>image</string>
??? <null/>
? </entry>
? <entry>
??? <string>category_id</string>
??? <string>3</string>
? </entry>
? <entry>
??? <string>default_sort_by</string>
??? <null/>
? </entry>
? <entry>
??? <string>custom_design_from</string>
??? <null/>
? </entry>
? <entry>
??? <string>updated_at</string>
??? <string>2010-12-24 11:37:41</string>
? </entry>
? <entry>
??? <string>meta_description</string>
??? <string>Jual baju gamis untuk muslim</string>
? </entry>
? <entry>
??? <string>custom_design_to</string>
??? <null/>
? </entry>
? <entry>
??? <string>path_in_store</string>
??? <null/>
? </entry>
? <entry>
??? <string>meta_title</string>
??? <string>Gamis</string>
? </entry>
? <entry>
??? <string>increment_id</string>
??? <null/>
? </entry>
</map>

Which one is better?

I personally prefer JSON, but fortunately, you always have a choice. :-)

Ubuntu Upstart for automatic MySQL start and stop

Dec 25, 2010

Here at Recorded Future we use Ubuntu (running on Amazon EC2), but so far we have not explored Ubuntu Upstart that much. During the holidays I made an effort to get acquainted with Upstart and to implement proper MySQL start and stop with it.If you do not know Upstart, this is the way you start and stop services in Ubuntu, and it serves the same purpose as the old /etc/init.d scripts, but are a bit more structured and powerful. That said, Upstart is regrettably far from complete, although the functionality is much better and Upstart has some cool features, some things do not work that well. For one thing, documentation, where it exists, is useless, at best. Secondly, there is very limited ability to test and develop Upstart scripts. And this is made worse by the fact that the documentation is so bad. Another thing is that Upstart insist on stopping services, by default, by sending a brutal kill signal. Not good for databases, mostly.In the /etc/init directory are the Upstart scripts you have. In difference to the old init.d scripts, you cannot disable a service in Upstart curenntly. If it is in /etc/init it will be started at system start. That’s it. And this is something that I am sure will be fixed, but for now, again, is something we have to live with. Upstart scripts have the suffix .conf (don’t ask me why), so the default MySQL Upstart script, for example, is called /etc/init/mysql.conf.In an Upstart script, there are Stanzas that determine what to do. Like the exec Stanza that runs a program for example. And you may then ask, when is it run? Startup? Shutdown? And the answer is startup. For shutting things down, as I said before, Upstart will by default just send a kill -9 signal.The minimal startup script you can have, and this actually works in a reasonable way, is to just have one line with an exec stanza, like this:exec /usr/bin/mydaemonWhich will start the daemon. For stopping the daemon, Upstart will send a -9 signal to the started process by default, and nothing more is needed in the Upstart script.For MySQL, we need to make things a bit more complicated. The default mysql.conf Upstart script really is not good. For one thing, it will not do a controlled shutdown of MySQL (this is possible even if Upstart will eventually send a kill -9 anyway). Secondly, this script assumes that what we use is a standard Ubunty installed MySQL distribution, so if you have installed MySQL in /usr/bin/mysql5147 or somethings like that, you are out of luck.So what I wanted to create was an Upstart script for MySQL that fullfilled these requirements:Starts MySQL automatically.Waits for MySQL to be available before exiting.Be configurable to support different MySQL install locations, data directories etc.Do a clean shutdown of MySQL when stopping the MySQL services.Before I show you what I ended up with, I want to comment on the points 2 and 4 above. With Upstart, you can define a script or command to run just before or after a services has been started or stopped, and this is what I use to wait for MySQL to become available, and to send a SIGTERM to the MySQL Server when stopping (which will do a clean MySQL shutdown).So here we go, a complete MySQL Upstart script, the way I want it to work:## MySQL Service for Recorded Future#description “MySQL Server”author “Anders Karlsson, Recorded Future”start on (net-device-up and local-filesystems and runlevel [2345])stop on runlevel [016]expect forkkill timeout 2# Set variables.env MYSQL_ETC=/etc/mysqlenv MYSQL_PIDFILE=/var/run/mysql.pidenv MYSQL_HOME=/usr/local/mysql5.5env MYSQL_INSTANCE=myumask 007exec $MYSQL_HOME/bin/mysqld_safe –defaults-file=$MYSQL_ETC/$MYSQL_INSTANCE.cnf >> /tmp/x.out &post-start script loop=600# Wait for MySQL to start. while [ $loop -gt 0 ]; do if $MYSQL_HOME/bin/mysqladmin –defaults-file=$MYSQL_ETC/$MYSQL_INSTANCE.cnf ping; then break fi loop=$(($loop – 1)) sleep 1 done exit 0end script# Send a soft SIGTERM to MySQL before Upstart will kill it.# A Sigterm to mysqld will cause a controlled shutdown.pre-stop script exec kill -SIGTERM `cat $MYSQL_PIDFILE`# Wait for MySQL to end. Flushing buffers and all. loop=600 while [ $loop -gt 0 ]; do# If the pidfile is found, then continue waiting. if [ -e $MYSQL_PIDFILE ] ; then loop=$((loop – 1)) sleep 1 continue fi break doneend scriptTo be honest, this is not what I create for all our MySQL servers. Instead I used this to create a chef template, chef is what we use for configuration management here (see http://www.opscode.com/ for more on chef), and here it is put to good ude to generate an Upstart script for MySQL. The above is just an example./Karlsson

Proposal for MariaDB trademark policy

Dec 21, 2010

Within Monty Program Ab we have during this year had a lot of discussions about how to go forward with the MariaDB trademark. It’s been clear that everyone wants to have something that is substantially freer than the MySQL trademark to ensure the survival of MariaDB whatever happens to Monty Program Ab.We wanted to make something that should work well, both for open source and commercial usage (and yes, I know that in some cases these are one and the same), which is not very common with many other trademark policies. My belief is that by having a very liberal trademark policy we will create a bigger ecosystem around MariaDB which will help all of us.Now we have had a couple of internal drafts (with heavy input from our community advocates) and we have released our first public draft.Please give us feedback about this either on my blog or the knowledge base so that we can take your thoughts into account for our final version!

Web2project v2.2 Release Notes – Keith Casey

Dec 21, 2010

web2project homepageAs of 19 December 2010, web2project v2.2 is officially live! You can download it from SourceForge now.

While in many releases we might focus on cleanup or functionality or developer aspects or similar, this one is a mishmash of a bunch of useful updates on numerous fronts. This isn’t all of the updates but a bunch of the important ones:

For the Project Managers:

  • We reworked much of the Gantt Chart logic. We’ve added a few icons to better represent the status of tasks and milestones. To make the overall charts easier to understand, we’ve added a legend and shaded alternate lines.
  • Gantt Charts are now exportable as single-page PDFs. You can print, email, share, or whatever with just a click.
  • We updated Token Tasks – which represent Subprojects – have been updated to prevent direct editing. Further, more of the Subproject data synchronizes as expected.
  • Depedency Tracking is now ON by default. This will provide better cascading updates when Tasks move.

For System Admins:

  • If System Timezone or System Admin Email are not set, the system will provide warning messages with links to the specific fields in the System Admin screens.
  • If filesystem permissions are properly configured, the Module screen supports direct uploading.
  • The Reports module has a permissions check applied. Previously, it did not.. though the underlying data was filtered appropriately.
  • The core system supports configurable pagination for the Project List screen and a few others.

For Developers:

  • We replaced our old Javascript library (Mootools) with jQuery. It’s faster, easier to use, and widely supported.
  • Added approximately 40 Unit Tests covering areas such as CDate and other classes.
  • Added a call in the Calendar Module to display arbitrary date-related information. A reference implementation is coming in the next release.

For General Users:

  • We’ve added Czech and Russian translations. If the dice rolls work out, we’ll move to Kamchatka next.
  • We’ve set the field focus to the first text box on each screen.
  • Private Tasks are now respected on all screens including Gantt Charts.
  • We fixed a number of visual issues.

Finally, special thanks goes to community member Opto who consistently submits great bug reports, shares useful patches, and provides random insights that help and speed things along. Thanks!

And that wraps our releases for 2010.

This year we managed 1 Major Release, 3 Minor Releases, and 1 Patch Release. Most of the releases were a week or two later than we wanted but we managed to get all of them out on schedule. More importantly, each and every release has managed to provide new functionality and close bugs while collecting and responding to community feedback.

And in case you missed our recent coverage on SourceForge, check it out!

Tuning InnoDB Configuration

Dec 21, 2010

I had earlier written a post on tuning the MySQL server configuration which was more geared towards the MyISAM storage engine. While that is not because I didn’t intend on ignoring InnoDB but because I had planned a whole post on tuning InnoDB related configuration. So this post is the post that I had planned, I have discussed the major configuration parameters in here that should help you out most of the times.

Dave Carver: Developer Culture Shock

Dec 15, 2010

Corporate developers seem to struggle a bit more when a company open sources their internally developed code. It’s not so much the development or coding aspect of it, but more the interaction and community building aspects they struggle with.

Some common items they struggle with:

  1. No knowledge silos. An open source project can’t afford to have knowledge silos. A successful project needs a team that can work on any piece of the project. This goes against most corporate training where people have very specific roles and responsibilities.
  2. No Testing Team. Developers are required to write their own unit tests, and integration tests. Many corporate developers seem to struggle with this. They have never had to do it, it’s always been the responsibility of the QA team to write the tests.
  3. Maintaining the Build. Again, many are used to just writing and submitting the code. Another team takes care of building the software. Note: This isn’t just a corporate problem, many open source projects struggle with this as well.
  4. Answering and Responding to forum/mailing lists. Typically a developer may never actually communicate with the person that filed a bug report. Part of growing a community is timely responses to questions and bugs.
  5. Marketing and Promotion. That’s the job of everybody on the team, not just the team leader. Again many aren’t used to having to do this, as the Marketing Department will handle promotion, press releases, etc.

None of these are simple things to address, but when choosing the initial team, look for those team members that may already be involved in open source projects. Seed the team with some of these people, and the initial growing pains for the project will be less severe. The biggest thing though, the team has to be willing to adapt and change, what they did in the corporate environment more than likely will not work with their open source project.

Bob Balfe: Google contributes GUI designer tool to Eclipse!

Dec 15, 2010

Wow, perfect timing for our Lotusphere presentation. You can download the tool right from Google or you can read about the functionality it brings.

Tools being donated include the WindowBuilder Java UI design tool as well as CodePro Profiler, a runtime Java analysis gauging factors like memory leaks. Both tools became Google property when the company bought Instantiations in August; they will now become open source projects at Eclipse. WindowBuilder has been used for development related to Standard Widget Toolkit, GWT (Google Web Toolkit), and Swing.

Check out the full article on InfoWorld.

MySQL Workbench: Manage MySQL on Windows Servers the Windows way

Dec 13, 2010

The MySQL team has been continuously improving its products on the Windows platform.?Along this line, we’ve responded to a request from our users of Workbench on Windows – to provide remote access to Windows Servers using Windows management methods – as an alternative? to SSH.
Managing a MySQL server obviously requires access to the target machine, which usually requires elevated rights for certain tasks like restarting the server or manipulating the configuration file on Windows (where this file is in a protected path). For local connections this is mostly not a big deal. However for remote boxes security measures prevent easy manipulation of such essential things like server processes. In this blog post we discuss native Windows management and how it can be used in MySQL Workbench.

Remote Management
MySQL Workbench first introduced remote access via SSH (secure shell), a widely used and well known approach for secure remote access, especially in the Linux world. Microsoft Windows does not come with an in-built SSH server, hence an additional installation is due. For Windows users is SSH quite an unkown land and very often security rules, policies, company restrictions etc. do not allow to add extra software or open access via SSH. Also setting up SSH is non trivial and can be quite a challenge forless technical users. For these reason we have added support for native Windows management, which comes at no extra cost, since it is built into Windows already.
Native Windows Management
The management we will discuss here is not about how to add users or databases to a MySQL server and things like that.? It’s rather about? administering the MySQL server Instance that we’ll discuss here – for instance, DBA tasks such as manipulating the MySQL configuration file or controlling the server processes. Windows comes with a universal management layer called WMI (Windows Management Instrumentation). WMI is a very powerful means to query all kind of data from a Windows system (drivers, BIOS, motherboard, performance data etc.) and to manipulate the state of certain components (services, subsystems etc.). If you are going to manage a MySQL installation on a Windows server from a Windows machine (Workbench supports Windows 7) then WMI is the way to go. Due to security restrictions (e.g. UAC) WMI access works best in a domain setup as it already has all the necessary pieces to make the interplay work seamlessly. At the end of the article I have included additional information to help when setting up native Windows management for non-domain environments. However beware as that involves? disabling some important UACs, which is not advisable in most instances.
In a Windows domain you will need is a user login that has local administrator rights on the target machine MySQL server runs on. By default firewalls and access rules are typicallu set so that Workbench can connect without extra effort. WMI is used to query a server’s status and start or stop it as well as to get system information like CPU load and memory usage. Manipulating the MySQL configuration file is done by using Window’s normal file system functions, which means the target box must provide access to the file via a shared folder. By default Windows systems have a number of default shares that are always available (so-called administrative shares that give access to the entire hard disk, provided you know the administrator’s credentials for login). On the client side you can then use different possibilities to access the server by using:

A mapped drive, e.g. Z:\<path to file>\my.ini
An administrative share, e.g. \\<server>\C$\<path to file>\my.ini
An explicit share which gives access only to the file or its parent folder, e.g. \\<server>\<share>\my.ini.

This should be an old hat for most Windows users, though I wanted to point out the possibilities.
Setting up a Server Instance
Let’s get to the actual setup of a new server instance in MySQL Workbench. What you need is:

The target server’s name or IP address.
Name and password of a user which is a local administrator -? a member of the administors group -? on the target machine.
The name of the MySQL service to manage.
The path of the configuration file.

Workbench will try to help you with the last two points by giving you a list of MySQL servers it finds on the remote computer and their configuration file location. So it should mostly be point-and-click once you are logged in there.
Connect to the Target Machine
Open the New Server Instance Wizard from Workbench’s home screen. It comes up with the initial screen that allows you to specify the host machine of the MySQL server you want to manage thereby determining if it is a local or a remote connection. For the sake of simplicity let’s reuse a MySQL connection that has been created already in the SQL Development section. A server instance always needs such a connection. So either you reuse an already defined one or create a new one that is then added to the list of connections.

In this example I have used a Windows 2008 R2 server, which hosts the MySQL server. After selecting the connection proceed to the next page by clicking on the “Next” button. The wizard will do some initial tests and display the outcome. For a few more details (especially if something goes wrong) I recommend to open the log window using the “Show Logs” button on the wizard form.

After proceeding to the next page you will be asked to select which type of remote management you want to use. Here is where you will see the Windows Remote option.

Since we want native Windows management the option the choice is obvious. Proceeding to the next page causes the wizard to open a WMI connection to the target machine and retrieve a list of installed MySQL servers (whether running or not). Note that only the MySQL servers installed as Windows Service are recognized. In order to connect we need the credentials for a user on the target machine. As mentioned earlier, this user must be a local administrator.

Don’t get confused by the term “Service” in the login dialog. This is not the Windows service but a key that describes the given credentials. Together with the user name it defines a tupel to allow storage and retrieval of the password. Once the connection is established you can choose the server you want to manage. Selecting a server entry will automatically fill the configuration file path with a default value constructed from the server name, the administrative share C$ and the path of the file found in the service entry. Usually this is a good guess and should work most of the time.

Sometimes though things are a bit different and you can get an error when you switch to the next page.
In that case just go back to the previous page and open the file selector by clicking on the “…” button. A File Open Dialog will pop up that allows to select the file you need. This also works for remote machines, just type the machine name in the input box or use the network branch for selection. Sometimes directly accessing a share might pose problems so you may alternatively want to map a network drive in Explorer before you go on with the selection of the configuration file. For our demo the letter Z has been mapped to \\workbench.testing\C$.

After you have picked the correct file, continue to the next page which will again check if the file is accessible from MySQL Workbench. Note: only the last of the 3 tests will be performed as we already have a connection and hence don’t need to test that again. And as we are on Windows no test for any system command is required. They must be available anyway (otherwise the installation is probably broken).

Continuing, the wizard will bring up a small window asking you for a decision regarding if you just want to proceed or review what settings have been collected so far. Usually you can go on and finish the wizard after you gave your new server instance profile a proper name.

If you however want to review the details, e.g. because there is still an error at this point then click on the button “I’d like to review the settings again”. This will bring up a page that would otherwise just be skipped, which lists the collected details and allows you to opt to change them manually. This is btw. the only way to adjust the section in the configuration file that is managed by MySQL Workbench in this wizard. However, the Server Instance Manager allows to set this value as well. The default is “mysqld”.

If you checked the option “Change Parameters” you will get to a page that allows you to select the configuration file, and also let’s you test again if the file is accessible and if the given section exists in it.

Once you are satisfied with the result click “Next” to continue with the last wizard page, where you can specify a name for the new instance and finish the wizard.

Note: In the case something goes wrong you will see that the wizard does not force you to provide 100% correct details most of the time. In fact you can still continue and create the server instance even if currently no connection is possible or you do not have all relevant details. Of course without correct user credentials the wizard is not able to give you a list of installed services, so this is the minimum information, which must be correct.
What about Windows Workgroups?
In smaller and/or home networks there is typically no domain controller active, so the relationship between Windows boxes is a bit different and it is sometimes much more complicated to adjust all the necessary settings to allow this kind of access from one machine to another. Note: non-domain environments are not supported by MySQL Workbench due to various problems there.
However there are a number of web pages that discuss the use of WMI in such scenarios, which might help you to get it to work. A good overview what needs to be set can be found on the “Connecting to WMI Remotely Starting with Windows Vista” page. Most of the time you will find that these settings are already in place (except for the firewall exception), though you still get either of the most common errors:

“RPC Server not available”, which indicates the target WMI service cannot be reached at all, usually because of firewalls or wrong server name.
“Access denied” which is? the result of access-token-filtering even if an administrator is logged in.

Denied-access errors are usually caused by the UAC. Read here what Microsoft has to say about “User Account Control and WMI”. Also consider the following tips:

Add user with Administrator rights or set the proper rights for another user in “Computer Management/Services and Applications/WMI-Control -> context menu-> Security”
Firewall (“netsh firewall set service RemoteAdmin enable”)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\ForceGuest must be 0.
A user connecting from a remote computer must have the SC_MANAGER_CONNECT privilege enabled to be able to enumerate services (admins usually have).

User Account Control is the major blocking stone in a workgroup environment. You will find connections to an old Windows XP box much simpler as there is no such thing as UAC there. Even for local management (i.e. MySQL Servers on the box where MySQL Workbench runs on) is affected by UAC. Running the application as administrator solves this (or disabling UAC). However since both methods are not recommended we have changed Workbench for this special case so it uses the old “sc” command to start and stop a service, in order to minimize trouble and effort for the most common case. WMI is still used for monitoring, just not for service control.

The community mourns the passing of Richard “Cyberlot” Thomas – Keith Casey

Dec 13, 2010

This post was lifted wholesale from Cal Evans’s post from DevZone. I think he summed it up well and I had nothing to add.

Today, the PHP community mourns the passing of a friend. Three weeks ago, Richard Thomas, community member and friend to all who knew him passed away. I had planned on writing this post today and am ashamed that I put it off so long. Thanks to Jeff Moore’s post and Paul M. Jones’s post I was reminded of my duty to my friend.

I didn’t know Richard as well as some. I hung out with him on IRC and we swapped work horror stories and coding tips whenever we met at conferences. I was privileged to see him just days before he passed when we were both at CodeWorks Portland. I got to talk to him for a bit at lunch and between sessions. Sadly for me, that conversations centered around topics so trivial that I don’t even recall the details, just that fact that it was with Richard.

From Jeff’s blog:

Richard is survived by his wife Lisa and four year old daughter Nicollette. Donations are being accepted to assist them. Even if you haven?t had contact with Richard, consider making a donation if you?ve done freelance work, as Richard was doing at the time of his death. Donations can be sent to:

Niki Fund, 4818 Davis Place #G, Renton WA, 98055

While I never like to hijack a moment, Paul made an excellent point on his post that I’ll repost here for all because it is sagely advice from a man I highly respect.

And now, a practical note: A lot of PHP folk out there are freelancers or independent consultants, or are in other kinds of unstable job situations. If you are one of these, and you have a family, *please* consider purchasing term life insurance to take care of your loved ones if you pass suddenly. Get it even if you are very young. It is not expensive. It?s not the only thing you should do to prepare, but it?s an important thing.

Richard died at his computer doing what he loved, programming. We will miss you Richard, the world is a little darker place without you.

Admittedly, I only knew Richard in passing. We’d met at a couple conferences and he was at CodeWorks last month. I wish I’d gotten to know him a little bit better.